DOP-C02 Resilient Cloud Solutions Practice Question
A DevOps team uses AWS CodePipeline to deploy a web application. The pipeline has a deploy stage that uses CodeDeploy to deploy to an Auto Scaling group. During deployment, the new instances fail health checks and the deployment rolls back. However, the rollback also fails because the old instances have been terminated. What should the team do to avoid this issue?
⚠ Common exam trap
DOP-C02 often tests the misconception that increasing health check grace periods or adding approvals solves rollback failures, when the real fix is preserving old instances via blue/green deployment.
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
✓
Use a blue/green deployment strategy in CodeDeploy to keep the old instances running until the new ones pass health checks.
A blue/green deployment strategy in CodeDeploy keeps the old (blue) instances running while the new (green) instances are provisioned and validated, so if the new instances fail health checks, the deployment can roll back to the still-running old instances. This avoids the scenario where in-place deployment terminates old instances before new ones are confirmed healthy, leaving nothing to roll back to. Blue/green also supports traffic shifting controls like all-at-once, linear, or canary.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
Increase the health check grace period in the Auto Scaling group.
Why it's wrong here
Increasing the Auto Scaling group's health check grace period only delays when the ASG starts evaluating the health of newly launched instances; it does not preserve the old instances or provide an environment to roll back to. Once the grace period expires, any instances failing health checks are terminated and replaced using the current launch configuration, meaning a faulty deployment has already overwritten the original state. This option does not create a rollback target or alter CodeDeploy's in-place update behavior, so it cannot fix a failed rollback.
- ✗
Add a manual approval step before the deploy stage.
Why it's wrong here
A manual approval step in the pipeline only gates the start of the deploy stage; it has no influence on how the deployment is performed or how a failure is handled after approval has been granted. After the human approves, the pipeline still executes the same in-place deployment that replaces or deletes the old instances, leaving no previous version intact if the new build fails health checks. The approval does not introduce any mechanism to keep the old environment running or to automatically revert to it, so it does not address the rollback failure.
- ✗
Configure the pipeline to deploy to a new Auto Scaling group each time.
Why it's wrong here
Creating a new Auto Scaling group for every pipeline execution shifts the traffic and instance lifecycle outside of CodeDeploy's built-in deployment tracking, requiring you to manually manage DNS, target groups, and the teardown of the previous ASG. A failed health check on the new ASG does not automatically route traffic back to the old ASG, because the pipeline's deploy action has no awareness of the previous group's state, so the old instances may have already been scaled in or terminated. This approach adds complexity and orphaned resources without providing the automatic, state-aware rollback that a native blue/green deployment offers.
- ✓
Use a blue/green deployment strategy in CodeDeploy to keep the old instances running until the new ones pass health checks.
Why this is correct
A blue/green deployment creates a fresh set of green instances beside the original blue instances, and traffic is shifted to the green fleet only after it successfully passes the configured health checks. If the green instances fail, CodeDeploy can keep the blue fleet available and immediately route traffic back to it, giving you a deterministic rollback path that does not require re-deploying the old revision. This directly solves the problem in the question, because the old instances remain running and intact until the new ones are proven healthy, making rollback both possible and rapid.
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 →
Same concept, more angles
1 more way this is tested on DOP-C02
These questions test the same concept from different angles. Work through them to make sure you can recognise it however the exam phrases it.
Variation 1. A company uses AWS CodeDeploy to deploy a new version of an application to EC2 instances. They want to minimize downtime and roll back quickly if the deployment fails. Which deployment type should they use?
easy- A.Canary deployment
- B.Linear deployment
- ✓ C.Blue/green deployment
- D.In-place deployment
Why C: Blue/green deployment creates two separate environments (blue and green) and shifts traffic from the old to the new after testing. This minimizes downtime because traffic is switched instantly, and rollback is achieved by reverting traffic to the original environment. Option A (Canary) is a traffic shifting pattern used within blue/green deployments, not a standalone deployment type that offers immediate rollback. Option B (Linear) is also a traffic shifting pattern for blue/green. Option D (In-place) updates existing instances, causing downtime during deployment and requiring a manual rollback process.
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 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.