DVA-C02 Deployment Practice Question
A developer is using AWS CodeDeploy with a blue/green deployment strategy for an EC2 Auto Scaling group. The deployment must automatically roll back if any of the new instances fail a health check within the first 10 minutes after deployment. Which configuration should the developer set?
⚠ Common exam trap
It's easy for candidates to confuse deployment configuration settings (like traffic shifting speed) with rollback triggers, or assume that enabling automatic rollback for deployment failures alone will cover post-deployment health check failures, but CodeDeploy requires a separate alarm-based rollback configuration to monitor health after instances are in service.
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
✓
Configure the deployment group to use an alarm-based rollback with a CloudWatch alarm on the ELB health check
The requirement is to automatically roll back based on health check failures within a specific time window after deployment. AWS CodeDeploy supports alarm-based rollbacks where you can configure a CloudWatch alarm that monitors the ELB health check status of the new instances. When the alarm triggers within the configured monitoring period (e.g., 10 minutes), CodeDeploy automatically rolls back the deployment to the previous version, meeting the exact condition described.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
Set the deployment configuration to 'CodeDeployDefault.EC2AllAtOnce'
Why it's wrong here
Setting the deployment configuration to 'CodeDeployDefault.EC2AllAtOnce' dictates how instances are updated (all at once) but does not inherently provide an automatic rollback mechanism based on the *health* of instances as monitored by an Elastic Load Balancer (ELB). This configuration primarily focuses on the success of the deployment steps on the instances themselves, such as application installation or script execution, rather than the ongoing operational health of the application after traffic is shifted in a Blue/Green context. Therefore, it cannot trigger a rollback if the newly deployed application becomes unhealthy post-deployment.
- ✓
Configure the deployment group to use an alarm-based rollback with a CloudWatch alarm on the ELB health check
Why this is correct
Configuring the deployment group with alarm-based rollback, specifically using a CloudWatch alarm on the ELB health check, is the correct and most robust solution for Blue/Green deployments. This approach allows CodeDeploy to monitor critical metrics from the ELB, such as the count of unhealthy hosts or HTTP 5xx errors, on the newly deployed environment. If the specified thresholds are breached, indicating application issues, the CloudWatch alarm will trigger CodeDeploy to automatically revert traffic to the original, stable environment, ensuring high availability and minimizing user impact.
- ✗
Enable automatic rollback in the deployment group configuration and set the event to 'DEPLOYMENT_FAILURE' or 'DEPLOYMENT_STOP_ON_REQUEST'
Why it's wrong here
Enabling automatic rollback with events like 'DEPLOYMENT_FAILURE' or 'DEPLOYMENT_STOP_ON_REQUEST' is insufficient for detecting application health issues after a successful deployment. 'DEPLOYMENT_FAILURE' triggers a rollback only if the deployment process itself fails (e.g., installation errors, lifecycle hook failures), while 'DEPLOYMENT_STOP_ON_REQUEST' is for manual intervention. Neither of these events monitors the *runtime health* of the application instances via an ELB's health checks, which is crucial for identifying problems that emerge once the new application version is actively serving traffic.
- ✗
Configure the deployment group with a 'LoadBalancerInfo' and enable 'originalInstanceTermination' for rollback
Why it's wrong here
Configuring the deployment group with 'LoadBalancerInfo' and enabling 'originalInstanceTermination' is a post-deployment cleanup action, not a rollback mechanism based on health checks. 'originalInstanceTermination' simply instructs CodeDeploy to terminate the instances of the *original* (old) environment *after* a successful Blue/Green deployment has completed and traffic has been fully shifted to the new environment. It does not initiate a rollback if the new instances become unhealthy; rather, it's part of the successful deployment's finalization process.
Go deeper
Related to this question
About these practice questions
One of 724 original DVA-C02 practice questions on Courseiva, each with a full explanation and wrong-answer analysis — not exam dumps or protected exam content. Learn why practice questions differ from exam dumps →
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.