Courseiva
Deployment →hardMultiple Choice

DVA-C02 Deployment Practice Question

A company uses AWS CodeDeploy to deploy an application to EC2 instances. The deployment fails with the error: 'The overall deployment failed because too many individual instances failed deployment, too few healthy instances are available, or some instances in your deployment group are experiencing problems.' The deployment group consists of 4 EC2 instances. The deployment configuration is 'CodeDeployDefault.OneAtATime'. The CodeDeploy agent logs on the failed instance show: 'Error: Script at specified location: scripts/install_dependencies.sh failed with exit code 1.' What should the developer do to resolve this issue?

⚠ Common exam trap

DVA-C02 often tests whether candidates focus on the actual error message (script exit code 1) versus superficial fixes like changing deployment configuration or reinstalling the agent — the trap is ignoring the script-level root cause.

Answer choices

Why each option matters

Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.

Correct answer & explanation

✓

Review the install_dependencies.sh script for errors and correct them.

The error message clearly indicates that the install_dependencies.sh script failed with exit code 1 on the instance. The root cause is a problem within the script itself (e.g., a failed package install, missing dependency, or syntax error). The developer must review and correct the script to resolve the deployment failure.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • ✗

    Change the deployment configuration to 'CodeDeployDefault.AllAtOnce'.

    Why it's wrong here

    Changing the deployment configuration to 'CodeDeployDefault.AllAtOnce' only alters the deployment strategy, causing all instances to be updated simultaneously instead of in batches. While this might speed up the overall deployment process if successful, it does not address the fundamental issue of a failing install_dependencies.sh script. The script would still encounter the same errors on every instance, leading to a complete deployment failure across the entire group, making this configuration change irrelevant to resolving script execution problems.

  • ✓

    Review the install_dependencies.sh script for errors and correct them.

    Why this is correct

    The problem statement indicates that the install_dependencies.sh script failed, which is a critical step in the CodeDeploy application lifecycle hooks, typically executed during the BeforeInstall or Install phase. When this script fails, CodeDeploy marks the instance deployment as unsuccessful because the necessary dependencies or setup steps were not completed. Identifying and correcting syntax errors, missing commands, incorrect paths, or permission issues within this specific script will directly resolve the root cause of the deployment failures, allowing subsequent deployments to succeed.

  • ✗

    Reinstall the CodeDeploy agent on the failed instance.

    Why it's wrong here

    Reinstalling the CodeDeploy agent is unnecessary because the agent successfully executed the install_dependencies.sh script and accurately reported its failure. This indicates the agent itself is operational and communicating correctly with the CodeDeploy service. Agent issues typically manifest as an inability to start deployments, communicate status, or execute any scripts at all, rather than specific script failures. Therefore, reinstalling the agent would not resolve an error within the application's deployment script.

  • ✗

    Increase the number of EC2 instances in the deployment group.

    Why it's wrong here

    Increasing the number of EC2 instances in the deployment group would only scale out the problem, not resolve it. If the install_dependencies.sh script contains errors, every new instance added to the deployment group would attempt to execute the same flawed script during its deployment lifecycle. Consequently, all these additional instances would also fail their deployments, leading to a larger number of unsuccessful deployments without addressing the underlying script issue. This action would waste resources and time without achieving a successful application deployment.

Visual reference

Client Recursive Resolver Root DNS (13 root servers) TLD DNS (.com, .org, …) Authoritative example.com query IP addr answer

About these practice questions

This DVA-C02 question is part of Courseiva's 1,135-question bank — original exam-style content with full explanations and wrong-answer analysis, never real exam questions or exam dumps. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

JA

Written and reviewed by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

Last reviewed September 2026 · checked against the official Amazon Web Services exam blueprint

This DVA-C02 practice question is part of Courseiva's free Amazon Web Services certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the DVA-C02 exam.