DVA-C02 Deployment Practice Question
A developer wants to deploy a new version of an application to an EC2 Auto Scaling group using AWS CodeDeploy. The developer wants to minimize downtime and ensure that if the deployment fails, it automatically rolls back to the previous version. Which deployment type should the developer choose?
⚠ Common exam trap
Many candidates confuse deployment types across compute platforms, mistakenly applying canary or linear (which are valid for Lambda/ECS) to EC2 Auto Scaling groups, where only in-place or blue/green are supported by CodeDeploy.
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
✓
Blue/green
Blue/green deployment is the correct choice because it creates a separate, new Auto Scaling group (green) alongside the existing one (blue), allowing traffic to be shifted to the new environment after validation. This minimizes downtime by keeping the old environment fully operational during the deployment, and CodeDeploy can automatically roll back by redirecting traffic to the blue environment if the deployment 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.
- ✗
In-place
Why it's wrong here
An in-place deployment updates existing instances directly, which cannot guarantee zero downtime because the application becomes unavailable on each instance during the update. It is tempting because in-place deployments are the simplest model for CodeDeploy and work well when the application can tolerate a brief interruption, such as during a maintenance window. However, the scenario requires automatic rollback on failure and minimal downtime, which an in-place deployment cannot reliably provide without manual intervention or traffic shifting.
- ✓
Blue/green
Why this is correct
Blue/green deployments are the recommended strategy for EC2 Auto Scaling groups when zero downtime and easy rollback are critical. This method involves provisioning an entirely new "green" environment with the updated application version, while the existing "blue" environment continues to serve traffic. Once the new instances in the green environment are validated, traffic is seamlessly shifted from the blue to the green environment, typically via a load balancer. This approach ensures minimal disruption and provides an immediate rollback option by simply reverting traffic to the original blue environment if issues arise post-deployment.
- ✗
Canary
Why it's wrong here
Canary is a deployment configuration type primarily designed for AWS Lambda functions and Amazon API Gateway within AWS CodeDeploy. It facilitates a gradual rollout by shifting a small, specified percentage of production traffic to the new application version first. This allows for real-world testing with a limited user impact before incrementally increasing the traffic to the new version. While the concept of phased rollouts exists, CodeDeploy's native "Canary" strategy is not directly applicable for managing deployments to EC2 Auto Scaling groups.
- ✗
Linear
Why it's wrong here
Linear is another deployment configuration specifically offered by AWS CodeDeploy for managing traffic shifts to new versions of AWS Lambda functions. This strategy defines a consistent, incremental traffic shift over a specified period, for example, routing 10% of traffic to the new version every 10 minutes until 100% is reached. Unlike blue/green for EC2, this time-based, percentage-driven traffic shifting mechanism is tailored for Lambda functions and is not a direct deployment option for updating instances within an EC2 Auto Scaling group.
Go deeper
Related to this question
About these practice questions
Courseiva writes every DVA-C02 question from scratch — 724 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 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.