DVA-C02 Development with AWS Services Practice Question
A developer is deploying a new version of an AWS Lambda function that is invoked by an Amazon API Gateway REST API. The developer wants to shift 10% of incoming traffic to the new version while keeping 90% on the current version, and then gradually increase traffic to the new version. The developer also needs the ability to roll back instantly if errors occur. Which approach should the developer use?
⚠ Common exam trap
The trap here is assuming that API Gateway stage canary settings or CodeDeploy are required for traffic shifting, when Lambda alias weighted routing directly provides the needed split and 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
✓
Publish a new Lambda function version and create an alias that points to both versions with a weighted routing configuration, then update the API Gateway integration to use the alias ARN.
Lambda aliases with weighted routing allow a developer to direct a percentage of invocations to a new version while keeping the rest on the current version. By pointing API Gateway to the alias ARN, the traffic split is enforced at the alias level. Adjusting the weights or repointing the alias provides immediate rollback, satisfying all requirements with minimal operational overhead.
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 to perform a blue/green deployment of the Lambda function, specifying a 10% traffic shift in the deployment configuration.
Why it's wrong here
CodeDeploy can shift traffic for Lambda deployments, but it requires creating a deployment group and a new version, and it manages the alias weights automatically. While possible, it introduces additional orchestration and is not the simplest approach when direct alias weighted routing is available and sufficient.
- ✓
Publish a new Lambda function version and create an alias that points to both versions with a weighted routing configuration, then update the API Gateway integration to use the alias ARN.
Why this is correct
Lambda aliases support weighted routing between two versions, allowing traffic to be split by percentage. API Gateway can invoke the alias ARN, so the traffic distribution is managed at the alias level. This enables gradual shifts and instant rollback by adjusting weights or repointing the alias to the previous version.
- ✗
Configure the API Gateway method to use a Lambda proxy integration and enable throttling to limit the new version's invocations.
Why it's wrong here
Throttling limits request rates but does not split traffic by percentage between two function versions. Lambda proxy integration passes the entire request to a single function and does not provide version routing. This approach cannot achieve the required 10/90 traffic split or instant rollback.
- ✗
Create a new API Gateway stage for the new Lambda version and use canary deployment settings on the stage to route 10% of traffic.
Why it's wrong here
API Gateway canary deployment settings route traffic between stage deployments, but they operate at the API level and require redeploying the API. They do not directly manage Lambda version weights, and rolling back involves redeploying the previous stage configuration, which is slower than adjusting alias weights.
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
Courseiva writes every DVA-C02 question from scratch — 1,135 in total, each with an explanation and a wrong-answer breakdown. None are copied from real exams or 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.