DOP-C02 SDLC Automation Practice Question
A DevOps engineer needs to automatically roll back a CodeDeploy deployment if the number of failed instances exceeds a threshold. Which deployment configuration should be used?
⚠ Common exam trap
A common mix-up: candidates confuse a deployment failure with an automatic rollback, assuming that failing the deployment inherently reverts changes, but CodeDeploy requires explicit rollback configuration (via minimum healthy hosts or CloudWatch alarms) to actually revert to a previous revision.
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
✓
Set the minimum number of healthy instances in the deployment configuration to trigger automatic rollback.
Setting the minimum number of healthy instances in the deployment configuration directly controls when CodeDeploy triggers an automatic rollback. When the number of healthy instances falls below this threshold during a deployment, CodeDeploy automatically stops the deployment and rolls back to the last known good state, meeting the requirement to roll back based on failed instance count.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
Configure the deployment group to ignore failed instances.
Why it's wrong here
Ignoring failures would not meet the requirement.
- ✓
Set the minimum number of healthy instances in the deployment configuration to trigger automatic rollback.
Why this is correct
CodeDeploy can automatically roll back based on health thresholds.
- ✗
Use a CloudWatch alarm to trigger a rollback.
Why it's wrong here
CloudWatch alarms can trigger actions but not directly roll back CodeDeploy.
- ✗
Use a custom deployment configuration that fails the deployment if any instance fails.
Why it's wrong here
This would stop the deployment but not automatically roll back.
Go deeper
Related to this question
About these practice questions
This DOP-C02 question is part of Courseiva's 251-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 →
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.