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?
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.
Blue/green deployments with AWS CodeDeploy involve two environments: the current (blue) and the new (green). To minimize downtime, traffic must be seamlessly switched from blue to green. This is achieved by using an Elastic Load Balancer (ELB) to route traffic between the environments (option A). Additionally, the new instances must be registered with the target group before traffic is switched (option E). Option B (Route53 weighted routing) is not the primary mechanism; CodeDeploy leverages the ELB for traffic shifting. Option C (Lambda for A/B testing) is unrelated to blue/green deployment. Option D (CloudFront with multiple origins) can be used but is not a required strategy for CodeDeploy blue/green; it is more relevant for content delivery. Therefore, the correct strategies are A and E.
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
| Model | You Manage | Provider Manages | Examples |
|---|---|---|---|
| IaaS | OS, runtime, apps, data | Hardware, hypervisor, networking | EC2, Azure VMs, GCP Compute Engine |
| PaaS | Apps and data | OS, runtime, middleware, hardware | Elastic Beanstalk, Azure App Service |
| SaaS | Data and settings only | Everything else | Microsoft 365, Salesforce, Workday |
| FaaS / Serverless | Function code only | Infra, scaling, runtime | Lambda, Azure Functions, Cloud Run |
| CaaS | Containers and apps | Kubernetes, OS, hardware | EKS, AKS, GKE |
Go deeper
Related to this question
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 →
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.