DOP-C02 SDLC Automation Practice Question
An organization uses AWS CodeDeploy for automated deployments to EC2 instances. The deployment is failing with the error 'The overall deployment failed because too many individual instances failed deployment, too few healthy instances are available for deployment, or some instances in your deployment group are experiencing problems.' The deployment group has a minimum healthy hosts setting of 75%. The application has 4 instances. What is the MOST likely issue?
⚠ Common exam trap
The trap here is that candidates may focus on individual instance failure causes (like missing scripts or permissions) instead of recognizing that the error message explicitly describes a fleet-wide healthy host count violation, making the math of 4 instances with 75% minimum the key diagnostic clue.
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 failed on 2 instances, leaving only 2 healthy.
With a minimum healthy hosts setting of 75% and 4 instances, at least 3 instances must remain healthy during deployment. If 2 instances fail, only 2 are healthy (50%), which falls below the 75% threshold, causing CodeDeploy to abort the deployment to prevent further impact. This error message directly corresponds to the healthy host count dropping below the configured minimum.
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 AppSpec file references a script that does not exist.
Why it's wrong here
A missing script referenced in the AppSpec file would trigger a failure on every instance that attempts to run that lifecycle hook, because the same AppSpec content is deployed to all target instances and the script is expected to exist locally. Since the deployment stopped with two instances still healthy, the failure was not uniform across the fleet, so a missing script—an all-or-nothing error—cannot be the root cause.
- ✗
The IAM instance profile does not have sufficient permissions.
Why it's wrong here
An insufficient IAM instance profile would prevent the CodeDeploy agent on each instance from assuming the required permissions to call the CodeDeploy API, download the revision from Amazon S3, or write logs to Amazon CloudWatch. This misconfiguration affects every instance simultaneously, resulting in a total deployment failure rather than a partial one, so it cannot explain why only two instances failed while two remained healthy.
- ✗
The CodeDeploy agent is not installed on any of the instances.
Why it's wrong here
If the CodeDeploy agent were not installed on any of the instances, the deployment would have failed before any deployment actually started, because none of the instances could register with the service to receive the deployment job. No instances would be available to report a successful status or run hooks, but in this scenario two instances stayed healthy—meaning their agents did work—so this option contradicts the observed outcome.
- ✓
The deployment failed on 2 instances, leaving only 2 healthy.
Why this is correct
For a deployment to four instances, a minimum healthy hosts percentage of 75% requires that at least three instances remain available throughout the deployment. When two instances failed, the healthy count dropped to two (50%), which is below the required threshold, so CodeDeploy was forced to abort the deployment and mark it as failed. This is a classic example of the minimum healthy hosts guardrail catching a partial-failure scenario that other, fleet-wide issues would not produce.
Go deeper
Related to this question
About these practice questions
Courseiva writes every DOP-C02 question from scratch — 1,298 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 →
JA
Written by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
This DOP-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 DOP-C02 exam.