DVA-C02 Deployment Practice Question
A company is deploying a new microservice on AWS Lambda behind an API Gateway. The development team wants to ensure that new versions of the Lambda function can be rolled out gradually and automatically rolled back if error rates exceed a threshold. Which deployment strategy should the team use?
⚠ Common exam trap
DVA-C02 often tests whether candidates know that automatic rollback requires CloudWatch alarms attached to a CodeDeploy deployment group, and that Lambda traffic shifting uses aliases, not ALBs — the trap is picking a manual rollback or an ALB-based answer.
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
✓
Use AWS CodeDeploy with a canary deployment strategy that shifts 10% of traffic to the new version for 5 minutes, then shifts the remaining 90%. Configure a CloudWatch alarm to automatically roll back if error rates exceed 2%.
AWS CodeDeploy supports canary deployments for Lambda, where you specify a percentage of traffic to shift to the new version for a specified interval, then shift the rest. You can attach CloudWatch alarms to the deployment group so that if error rates exceed a threshold during the canary window, CodeDeploy automatically rolls back to the previous version. This matches the requirement for gradual rollout and automatic rollback.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✓
Use AWS CodeDeploy with a canary deployment strategy that shifts 10% of traffic to the new version for 5 minutes, then shifts the remaining 90%. Configure a CloudWatch alarm to automatically roll back if error rates exceed 2%.
Why this is correct
This option correctly leverages AWS CodeDeploy's canary deployment strategy, which gradually shifts a small percentage of traffic (10%) to the new Lambda version initially. This allows for real-world testing with minimal impact before shifting the remaining traffic. Crucially, integrating a CloudWatch alarm for error rates enables automatic rollback, ensuring immediate mitigation if the new version introduces issues, making it a robust and safe deployment approach.
- ✗
Use AWS Lambda function aliases with weighted alias traffic shifting. Update the weights manually and monitor error rates using CloudWatch. Roll back by reverting the alias weights.
Why it's wrong here
While AWS Lambda function aliases do support weighted traffic shifting, this method requires manual updates to the alias weights and manual monitoring of CloudWatch metrics. The absence of an integrated, automatic rollback mechanism means that any issues detected would necessitate manual intervention to revert traffic, which is prone to human error and delays in critical production environments.
- ✗
Use AWS CodeDeploy with a linear deployment strategy that shifts 10% of traffic every 5 minutes. Configure a CloudWatch alarm to monitor error rates and manually roll back if needed.
Why it's wrong here
AWS CodeDeploy's linear deployment strategy is a valid approach for gradual traffic shifting, but this option specifies a manual rollback despite configuring a CloudWatch alarm. CodeDeploy is designed to integrate CloudWatch alarms for automatic rollbacks, which is a critical feature for ensuring high availability and rapid recovery from deployment failures. Relying on manual intervention negates a primary benefit of automated deployment tools.
- ✗
Use AWS CodeDeploy with a blue/green deployment and an Application Load Balancer (ALB) to shift traffic to the new version. Configure CloudWatch alarms to trigger a rollback if errors exceed 5%.
Why it's wrong here
This option incorrectly proposes using an Application Load Balancer (ALB) for blue/green deployments with AWS Lambda functions. Blue/green deployments orchestrated by CodeDeploy for Lambda directly manage traffic shifting between Lambda function versions via aliases, without involving an external ALB. ALBs are typically utilized for routing traffic to EC2 instances or ECS containers, not directly to Lambda functions in this context.
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
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 →
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.