DVA-C02 Deployment Practice Question
A developer is deploying a new version of an application to Amazon ECS using AWS CodeDeploy. The application uses a blue/green deployment strategy. After the deployment, traffic is automatically shifted to the new task set. However, the developer wants to test the new version with a small percentage of users before shifting all traffic. What should the developer do?
⚠ Common exam trap
Many candidates confuse 'canary deployment' (traffic shifting) with 'auto scaling' (task count scaling) or think that modifying the task definition or target group alone can achieve gradual traffic routing.
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 CodeDeploy to perform a canary deployment that shifts 10% of traffic initially.
CodeDeploy supports canary deployments for ECS, which allow you to shift a specified percentage of traffic to the new task set initially (e.g., 10%) and then, after a configured interval, shift the remaining traffic. This matches the requirement to test with a small percentage of users before shifting all traffic. Option B directly implements this canary strategy.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
Create a new ECS task definition with a different CPU/memory allocation.
Why it's wrong here
Creating a new ECS task definition, even with different CPU/memory allocations, defines the blueprint for how containers run, but it does not inherently control traffic shifting between different application versions. A task definition specifies container images, resource limits, and network modes, serving as a template for tasks. It is not a mechanism for managing the deployment strategy or routing client traffic from an old version to a new one.
- ✓
Use CodeDeploy to perform a canary deployment that shifts 10% of traffic initially.
Why this is correct
Using CodeDeploy to perform a canary deployment is the correct approach for gradually shifting traffic to a new application version in ECS. CodeDeploy integrates with ECS and an Application Load Balancer (ALB) to manage two target groups (one for the old task set, one for the new). It progressively updates the ALB listener rules to route a specified percentage of traffic, like 10% initially, to the new version, allowing for controlled rollout and easy rollback.
- ✗
Configure the target group to route traffic to a specific task set.
Why it's wrong here
Configuring a target group to route traffic to a specific task set is insufficient for percentage-based traffic shifting between application versions. An Application Load Balancer (ALB) target group distributes incoming traffic evenly among all healthy registered targets (ECS tasks) within that group. To shift traffic between distinct versions, you typically need *two* separate target groups (one for the old version, one for the new) and a deployment controller like CodeDeploy to adjust the traffic distribution between them.
- ✗
Use ECS service auto scaling to gradually increase the number of tasks.
Why it's wrong here
Using ECS service auto scaling to gradually increase the number of tasks manages the capacity of an existing service based on demand, not the controlled rollout of a new application version. Auto scaling adjusts the task count to maintain performance or cost efficiency for a single, deployed version of an application. It does not facilitate shifting traffic from an old version to a new, distinct version of the application.
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.