Courseiva
DeploymenthardMultiple ChoiceObjective-mapped

DVA-C02 Deployment Practice Question

A developer is deploying a microservices application on Amazon ECS with the Fargate launch type. The application uses an Application Load Balancer (ALB) to route traffic. The developer wants to perform a blue/green deployment with automated traffic shifting using AWS CodeDeploy. What is the minimum number of target groups required for this deployment?

⚠ Common exam trap

Many exam-takers confuse blue/green deployments with canary deployments or assume that a single target group with multiple ports can serve both environments, but AWS CodeDeploy for ECS explicitly requires two distinct target groups to manage traffic shifting and rollback.

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

Two

In a blue/green deployment with AWS CodeDeploy and an Application Load Balancer (ALB) on Amazon ECS (Fargate), two target groups are required: one for the 'blue' (current) environment and one for the 'green' (new) environment. CodeDeploy shifts traffic from the blue target group to the green target group by updating the ALB listener rules, allowing zero-downtime deployments and automated rollback if needed.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • One

    Why it's wrong here

    A single target group is insufficient for a blue/green deployment strategy because it can only route traffic to a single, active set of tasks at any given time. Blue/green deployments require the ability to maintain two distinct environments (the current "blue" version and the new "green" version) simultaneously, allowing for traffic shifting and rollback capabilities. A single target group cannot independently manage and switch between these two separate task sets.

  • Two

    Why this is correct

    For a successful blue/green deployment with AWS CodeDeploy and ECS, two distinct target groups are essential. One target group is initially associated with the "blue" (current production) task set, while the second target group is associated with the "green" (new version) task set. AWS CodeDeploy orchestrates the traffic shift by updating the listener rules on the Application Load Balancer (ALB) to gradually or instantly direct traffic from the blue target group to the green target group. This setup facilitates seamless cutovers and provides a straightforward rollback mechanism.

  • Three

    Why it's wrong here

    While a third target group could be used in more complex scenarios, such as for a canary release or a dedicated test environment, it is not a fundamental requirement for a standard blue/green deployment. The core mechanism of blue/green involves switching traffic between two complete environments. Introducing an unnecessary third target group for the primary traffic shift adds complexity without providing additional benefit for the basic blue/green pattern.

  • Four

    Why it's wrong here

    Utilizing four target groups for a standard blue/green deployment on ECS with CodeDeploy is excessive and introduces unwarranted architectural complexity. The fundamental design of blue/green traffic shifting relies on having two distinct environments, each backed by its own target group. More than two target groups would complicate the listener rule configuration on the ALB and the CodeDeploy deployment group setup, making management and troubleshooting more difficult without enhancing the core blue/green functionality.

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 →

How Courseiva writes practice questions · Editorial policy

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.