Courseiva
Deployment →mediumMultiple Select

DVA-C02 Deployment Practice Question

A company is deploying a critical application using AWS CodeDeploy. To minimize downtime, they want to perform a blue/green deployment. Which TWO strategies should they implement?

⚠ Common exam trap

DVA-C02 often tests the specific AWS services used for blue/green; candidates may confuse Route 53 weighted routing with CodeDeploy's ELB-based traffic shifting, but CodeDeploy blue/green relies on ELB target groups, not DNS.

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 an Elastic Load Balancer to route traffic between the blue and green environments.

Option A is correct because AWS CodeDeploy blue/green deployments for EC2/on-premises rely on an Elastic Load Balancer (ALB or CLB) to route production traffic to either the blue (original) or green (replacement) environment, enabling an instant cutover with minimal downtime. Option E is correct because the replacement instances must be registered with the load balancer's target group and pass health checks before CodeDeploy shifts traffic, ensuring the green environment is healthy and avoiding failed requests during the switch. Option B is not appropriate because CodeDeploy blue/green traffic shifting is handled by the load balancer's listener/target groups, not by a Route 53 weighted routing policy, which is used for DNS-level traffic distribution. Option C is incorrect because A/B testing is a separate deployment configuration concept and a Lambda function is not required to perform the blue/green cutover. Option D is incorrect because CloudFront with multiple origins is a content-delivery/caching pattern, not the mechanism CodeDeploy uses to shift traffic between blue and green environments.

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 an Elastic Load Balancer to route traffic between the blue and green environments.

    Why this is correct

    An Elastic Load Balancer is essential to an AWS CodeDeploy blue/green deployment because CodeDeploy uses it as the traffic-control mechanism. The deployment registers the new environment's instances with a replacement target group, allows them to pass health checks, and then shifts production traffic away from the original target group. Without an ELB, there is no managed way to atomically reroute traffic and deregister the old instances.

  • ✗

    Use an Amazon Route 53 weighted routing policy to gradually shift traffic.

    Why it's wrong here

    A Route 53 weighted routing policy shifts traffic by changing DNS responses, but this is not part of CodeDeploy's blue/green workflow and introduces DNS caching delays that can leave users on the old environment. CodeDeploy's native traffic shifting relies on the elastic load balancer's target-group health checks to control visible instances, not on record-set weight changes. Using Route 53 also bypasses the automatic rollback and deregistration lifecycle that CodeDeploy choreographs, so it is not the recommended or standard deployment strategy.

  • ✗

    Configure an AWS Lambda function to perform A/B testing during deployment.

    Why it's wrong here

    A Lambda function cannot orchestrate a blue/green deployment because CodeDeploy already provides built-in deployment configurations such as Canary and Linear, without needing custom compute logic. You might use Lambda for canary analysis or A/B testing metrics, but that is an observability step, not the deployment mechanism itself. The question asks for an answer that explains how traffic is shifted, and CodeDeploy does that through the load balancer, not through a function you write.

  • ✗

    Use an Amazon CloudFront distribution with multiple origins.

    Why it's wrong here

    CloudFront with multiple origins can serve content from different stacks, but it is overkill and an atypical approach for a CodeDeploy blue/green deployment. CloudFront is a CDN that caches at edge locations, so switching traffic between entire application environments is not its job; it does not understand target groups, health checks, or temporary registration. This option fails to address the required traffic-shifting mechanics inside a VPC and would not be how a critical application is deployed with CodeDeploy.

  • ✓

    Ensure the new instances are registered with the target group before switching traffic.

    Why this is correct

    Before CodeDeploy can shift traffic, the newly launched instances must be registered with the replacement target group so the load balancer can send them traffic and perform health checks. If registration or health checking fails, CodeDeploy aborts the deployment to avoid routing users to unhealthy instances. This registration step is a prerequisite for the ELB to balance requests between the blue and green environments safely.

Quick reference

Cloud Service Model Comparison

ModelYou ManageProvider ManagesExamples
IaaSOS, runtime, apps, dataHardware, hypervisor, networkingEC2, Azure VMs, GCP Compute Engine
PaaSApps and dataOS, runtime, middleware, hardwareElastic Beanstalk, Azure App Service
SaaSData and settings onlyEverything elseMicrosoft 365, Salesforce, Workday
FaaS / ServerlessFunction code onlyInfra, scaling, runtimeLambda, Azure Functions, Cloud Run
CaaSContainers and appsKubernetes, OS, hardwareEKS, AKS, GKE

About these practice questions

One of 1,135 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 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.