Courseiva
Development with AWS ServicesmediumMultiple ChoiceObjective-mapped

DVA-C02 Development with AWS Services Practice Question

A developer is using AWS CodePipeline to deploy a web application to an Auto Scaling group. The pipeline includes a deploy action that uses CodeDeploy. 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.' Which of the following is the MOST likely cause?

⚠ Common exam trap

Watch out — candidates often confuse individual instance failures (e.g., missing agent, hook errors) with the deployment group-level threshold error, leading them to pick options that explain why a single instance failed rather than why the entire deployment was aborted.

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

The deployment configuration has a minimum healthy instances setting that is too restrictive.

The error message indicates that the deployment failed because too many instances were unhealthy or failed. The most likely cause is that the deployment configuration's minimum healthy hosts setting is too restrictive, meaning it requires a higher percentage of healthy instances during deployment than the environment can sustain, causing CodeDeploy to stop the deployment when the threshold is breached.

Answer analysis

Option-by-option breakdown

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

  • The CodeDeploy agent is not sending logs to CloudWatch.

    Why it's wrong here

    While sending CodeDeploy agent logs to CloudWatch is crucial for monitoring and troubleshooting, a failure to send logs does not inherently cause a deployment to fail. The CodeDeploy service primarily relies on the agent's status reports and command execution results to determine deployment success or failure. Missing logs would only hinder the ability to diagnose *why* a deployment failed, not cause the failure itself.

  • The deployment configuration has a minimum healthy instances setting that is too restrictive.

    Why this is correct

    CodeDeploy deployment configurations, such as `CodeDeployDefault.OneAtATime` or custom settings, include a `minimum healthy instances` threshold. If this setting is too restrictive, for example, requiring 100% of instances to remain healthy during a rolling update, the deployment will fail when even a single instance is taken offline for the update. The deployment cannot proceed if the number of healthy instances drops below the specified minimum, leading to a "too few healthy instances" error.

  • The application's lifecycle hooks are failing during the ApplicationStop event.

    Why it's wrong here

    If an application's lifecycle hooks, particularly during the `ApplicationStop` event, were failing, the CodeDeploy deployment would typically report an error related to the script execution itself. This would manifest as a "Script Failed" or "Lifecycle Event Failed" status, often with specific details about the script and its exit code. This is distinct from an error indicating an insufficient number of healthy instances, which points to a configuration issue rather than a script execution problem.

  • The instances were launched from an AMI that does not have the CodeDeploy agent installed.

    Why it's wrong here

    If the CodeDeploy agent were not installed on the target instances, the CodeDeploy service would be unable to communicate with them at all. This would typically result in errors such as "No Healthy Hosts" or "Agent Not Registered," indicating that the instances are unreachable or not participating in the deployment group. This is fundamentally different from an error stating "too few healthy instances," which implies the agent *is* installed and reporting, but the overall healthy count is below a configured threshold.

About these practice questions

Courseiva writes every DVA-C02 question from scratch — 724 in total, each with an explanation and a wrong-answer breakdown. None are copied from real exams or dumps. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

JA

Written by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

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.