DVA-C02 Development with AWS Services Practice Question
A developer is deploying a new version of an AWS Lambda function using the AWS CLI. The developer wants to ensure that the new version is stable before routing all traffic to it. The developer has already published version 1 and version 2 of the function. The developer wants to send 10% of the traffic to version 2 and 90% to version 1. The developer then plans to gradually increase the traffic to version 2. Which approach should the developer use?
⚠ Common exam trap
DVA-C02 often tests the confusion between Lambda versions and aliases, where candidates might think traffic weights can be set on versions directly, or that API Gateway is required for weighted routing.
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 Lambda alias named 'prod' and update the alias's routing configuration to send 10% traffic to version 2 and 90% to version 1.
AWS Lambda aliases allow you to create a named reference to a specific function version and configure weighted routing between two versions. By creating an alias (e.g., 'prod') and setting its routing configuration to send 10% of traffic to version 2 and 90% to version 1, the developer can gradually shift traffic. This is the standard approach for canary deployments with Lambda. The alias can be updated to adjust weights as confidence in the new version grows.
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 the Lambda function's versioning feature to set the traffic weight directly on the function.
Why it's wrong here
Traffic weights cannot be set on a published Lambda version itself; they belong to an alias, which is the resource that maps a weighted routing configuration between two versions. Versioning alone merely creates immutable snapshots. An alias with `update-alias --routing-config` is the correct mechanism for gradual canary shifts.
- ✓
Create a Lambda alias named 'prod' and update the alias's routing configuration to send 10% traffic to version 2 and 90% to version 1.
Why this is correct
A Lambda alias with routing configuration splits invocation traffic between two published versions by percentage, so 10% to version 2 and 90% to version 1 is achieved, then adjusted gradually. Aliases provide the weighted shifting that the scenario requires.
- ✗
Configure the API Gateway endpoint to route 10% of requests to version 2 and 90% to version 1.
Why it's wrong here
API Gateway cannot split traffic between two Lambda versions by percentage; it invokes one integration target. Canary releases at API Gateway stage level shift a fixed percentage to a stage deployment, not arbitrary version weights, so the 10/90 version split is unachievable here.
- ✗
Create a new alias and assign the traffic weights to the versions in the alias configuration.
Why it's wrong here
Creating a new alias is unnecessary; you should update an existing alias (e.g., 'prod') to configure weighted routing for gradual traffic shifting.
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.