SOA-C02 Deployment, Provisioning, and Automation Practice Question
A company runs a critical application on a fleet of EC2 instances in an Auto Scaling group. The application is deployed using a blue/green deployment strategy with AWS CodeDeploy. The green environment fails immediately after deployment, and the deployment is automatically rolled back. However, the rollback also fails because the original blue environment's Auto Scaling group has been scaled down. What should the SysOps administrator do to prevent this issue in future deployments?
⚠ Common exam trap
Many exam-takers assume increasing the Auto Scaling group's minimum size (Option B) will preserve the blue environment, but they miss that CodeDeploy explicitly terminates the old instances as part of the blue/green deployment lifecycle, regardless of the minimum size setting.
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 original environment termination delay to a longer duration in the CodeDeploy deployment group.
Setting the original environment termination delay in the CodeDeploy deployment group ensures that the blue Auto Scaling group instances are not terminated immediately after a successful deployment. This delay keeps the blue environment available during the rollback window, preventing the rollback failure that occurs when the original environment has already been scaled down. The termination delay is a configurable setting in CodeDeploy that holds the old instances for a specified period, allowing a safe fallback if the new environment fails.
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 to automatically delete the green environment after rollback.
Why it's wrong here
Deleting the green environment after a rollback is counterproductive because the green environment is the original pre-deployment state you roll back to. In AWS CodeDeploy blue/green deployments, the green (original) instances are intentionally kept alive until the termination delay expires specifically so traffic can be rerouted back to them if needed. Furthermore, there is no CodeDeploy setting that automatically deletes green after rollback; rollback relies on the continued existence of green, not its deletion.
- ✗
Increase the minimum size of the Auto Scaling group.
Why it's wrong here
Increasing the minimum size of the Auto Scaling group changes the group's desired capacity but does not alter CodeDeploy's blue/green deployment behavior. The original blue instances are terminated based on the deployment group's termination delay setting, independent of ASG size. Even if the ASG launches new replacement instances, those are not the original blue environment and cannot be used to roll back to the exact pre-deployment state, so this option does nothing to preserve the blue fleet for rollback.
- ✗
Change the deployment type to in-place.
Why it's wrong here
In-place deployments do not maintain a separate blue environment because they update the existing instances in place, overwriting the application version on the same hosts. This means there is no pristine original fleet to reroute traffic to if the deployment fails; rollback would require redeploying the previous application revision to the same modified instances. The question specifically asks about retaining the original environment, which is only possible with blue/green deployments, so switching to in-place is directly contradictory to that goal.
- ✓
Set the original environment termination delay to a longer duration in the CodeDeploy deployment group.
Why this is correct
In AWS CodeDeploy blue/green deployments, the original instances (the blue environment) are kept alive for a configured 'original environment termination delay' before being terminated. Extending this delay preserves the blue fleet for a longer period, allowing you to roll back by rerouting traffic back to the original instances if the new deployment proves faulty. This is the proper mechanism to ensure the original environment remains available for rollback, either automatically or through manual intervention.
Go deeper
Related to this question
About these practice questions
Courseiva writes every SOA-C02 question from scratch — 1,169 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 SOA-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 SOA-C02 exam.