Courseiva
DeploymentmediumMultiple SelectObjective-mapped

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.)

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.

In a Blue/Green deployment, you create a new Auto Scaling group with the new application version and register it with the existing ALB. Option E is correct because after the new environment is ready, you gradually shift traffic from the old environment to the new environment using the ALB to ensure zero downtime. Option A is incorrect because you should reuse the existing ALB to avoid re-creating DNS and other configurations. Option C is incorrect because updating the existing Auto Scaling group in-place would cause downtime (rolling update) rather than a true Blue/Green deployment. Option D is incorrect because terminating old instances immediately could cause downtime if the new environment fails; you should allow rollback by keeping old instances until traffic is fully shifted.

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 724-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 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.