Courseiva
Deployment →mediumMultiple Select

DVA-C02 Deployment Practice Question

A company is deploying a new web application on Amazon EC2 instances behind an Application Load Balancer. The application must be deployed with no downtime. The deployment uses AWS CodeDeploy with a Blue/Green deployment configuration. Which TWO actions should be taken to achieve zero-downtime deployment? (Choose TWO.)

⚠ Common exam trap

DVA-C02 often tests the misconception that Blue/Green requires a new load balancer or that old instances should be terminated immediately — candidates must remember that the ALB and target groups enable traffic shifting and that old instances are retained for 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

✓

Create a new Auto Scaling group with the new application version and register it with the ALB.

Option B is correct because a CodeDeploy blue/green deployment for EC2 requires provisioning a replacement environment — a new Auto Scaling group running the new application revision — and registering it with the existing Application Load Balancer so it can serve traffic. Option E is correct because zero downtime is achieved by having the ALB gradually shift traffic from the original (blue) target group to the replacement (green) target group, using CodeDeploy's traffic-shifting controls (e.g., all-at-once, linear, or canary) before the old instances are terminated. Option A is wrong because creating a separate load balancer is unnecessary and would not provide the controlled traffic rerouting that CodeDeploy performs through the ALB's target groups. Option C is wrong because updating the existing Auto Scaling group in place is an in-place deployment, not blue/green, and would replace instances without the parallel green environment needed for zero downtime. Option D is wrong because terminating the old instances immediately removes the safety net and can cause dropped connections; the original environment must be kept until traffic has fully shifted and the deployment succeeds.

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 load balancer for the new environment.

    Why it's wrong here

    Creating a brand-new load balancer for the green environment is unnecessary because the existing ALB can already route to multiple target groups. A new ALB would introduce a separate DNS endpoint, forcing clients or aliases to change and adding operational overhead. Blue/green should reuse the same front end and simply adjust listener rules or weighted target groups to shift traffic to the new Auto Scaling group.

  • ✓

    Create a new Auto Scaling group with the new application version and register it with the ALB.

    Why this is correct

    Registering a newly created Auto Scaling group running the new application version into the existing ALB is the foundational blue/green action. The new ASG is placed in its own target group, so its instances can pass health checks and receive test traffic without altering the old ASG. This isolates the new environment while keeping the old one fully available for a controlled cutover.

  • ✗

    Update the existing Auto Scaling group with the new application version.

    Why it's wrong here

    Updating the existing Auto Scaling group to the new application version is an in-place or rolling update, not blue/green. The same ASG, launch template, target group, and instances are mutated, so the old environment is destroyed before the new build is validated. If the new version is unhealthy, you cannot instantly roll back to a separate old environment; you would have to redeploy, causing longer downtime.

  • ✗

    Terminate the old EC2 instances immediately after deploying the new ones.

    Why it's wrong here

    Terminating the old EC2 instances immediately after the new ones are deployed destroys the rollback path before the new environment has proven stable. During cutover, if the new target group fails health checks or produces errors, the old instances are gone and the application becomes unavailable. Blue/green keeps the old fleet running until traffic has been fully shifted and the new environment is verified.

  • ✓

    Gradually shift traffic from the old environment to the new environment using the ALB.

    Why this is correct

    The ALB listener rules can gradually increase the proportion of traffic sent to the green target group, for example 10%, 50%, then 100%, while the old target group still serves the remainder. This lets you validate the new application under real traffic and instantly shift back by reversing the weights if a problem appears. Without this gradual shift, you would simply have two parallel environments with no controlled cutover.

About these practice questions

This DVA-C02 question is part of Courseiva's 1,135-question bank — original exam-style content with full explanations and wrong-answer analysis, never real exam questions or exam dumps. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

JA

Written and reviewed by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

Last reviewed September 2026 · checked against the official Amazon Web Services exam blueprint

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.