Question 318 of 724
DVA-C02 Deployment Practice Question
A developer is deploying a microservices application on Amazon ECS using Fargate. The developer wants to implement a blue/green deployment strategy using AWS CodeDeploy. The current production environment uses an Application Load Balancer (ALB). What is the minimum configuration required to enable blue/green deployments?
⚠ Common exam trap
Watch out — candidates often assume a single target group is sufficient because they think blue/green only requires swapping task definitions, but CodeDeploy explicitly needs two target groups to manage traffic routing and rollback independently.
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
✓
An ALB with two target groups, one for blue and one for green.
AWS CodeDeploy for Amazon ECS requires an Application Load Balancer (ALB) with two target groups to handle traffic routing during a blue/green deployment. The blue target group serves the current production version, while the green target group serves the new version. CodeDeploy shifts traffic from blue to green by updating the ALB listener rules, and after a successful deployment, the green target group becomes the new production target.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✓
An ALB with two target groups, one for blue and one for green.
Why this is correct
An Application Load Balancer (ALB) with two distinct target groups, one designated for the "blue" (current production) environment and another for the "green" (new version) environment, is the standard and most effective architecture for blue/green deployments. The ALB acts as a stable entry point, and its listener rules can be precisely updated to shift traffic from the blue target group to the green target group after successful validation, enabling zero-downtime deployments and immediate rollback capabilities. This setup allows both versions to run concurrently, facilitating thorough testing of the new version before promoting it to full production traffic.
- ✗
An ALB with a single target group and an Amazon CloudFront distribution.
Why it's wrong here
An ALB with a single target group cannot facilitate a blue/green deployment because this strategy inherently requires two separate, concurrently running environments (blue and green) to switch traffic between. While an Amazon CloudFront distribution can improve performance and security by caching content and acting as a CDN, it operates at a layer above the ALB and does not provide the necessary traffic shifting or environment management capabilities required for a blue/green deployment. CloudFront would simply route requests to the *single* ALB target group, offering no mechanism to switch between old and new application versions.
- ✗
An ECS service discovery namespace.
Why it's wrong here
An ECS service discovery namespace, typically implemented with AWS Cloud Map, is designed to help microservices locate and communicate with each other dynamically within an application. While crucial for complex microservices architectures, service discovery does not directly provide the traffic management and environment switching mechanisms fundamental to a blue/green deployment strategy. It enables services to find endpoints, but it doesn't orchestrate the deployment of new application versions or manage the controlled traffic shift between distinct blue and green environments.
- ✗
A Network Load Balancer (NLB) with a single target group.
Why it's wrong here
A Network Load Balancer (NLB) with a single target group is insufficient for a blue/green deployment because it lacks the ability to simultaneously host and switch traffic between two distinct application versions. NLBs operate at Layer 4 (TCP/UDP) and primarily forward traffic based on IP address and port, offering less flexibility for application-level routing compared to ALBs. While an NLB *could* be part of a more complex blue/green setup involving multiple NLBs or IP-based routing to multiple target groups, a single target group fundamentally prevents the necessary concurrent existence and controlled traffic shifting between blue and green environments.
About these practice questions
Courseiva creates original exam-style practice questions with explanations and wrong-answer analysis. It does not publish real exam questions, exam dumps, or protected exam content. Learn why practice questions differ from exam dumps →
Last reviewed: Jul 4, 2026
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.
Question Discussion
Share a tip, memory trick, or ask about the reasoning behind this question. Do not post real exam questions, leaked content, braindumps, or copyrighted exam material. Comments are moderated and may be removed without notice.
Sign in to join the discussion.