How to Implement Weighted Traffic Routing for AWS Lambda Versions?
Short answer
D Update the Lambda code and create a new version of the Lambda function. Create a Lambda function alias. Configure the traffic weights in the Lambda alias between the two Lambda function versions. Send 90% of the traffic to the production version, and send 10% of the traffic to the new version.
Question
Key Takeaways
This question tests your knowledge of Lambda aliases and their ability to split traffic between two published versions using configured weights.
AWS Lambda aliases enable weighted traffic routing between function versions, allowing developers to safely roll out code changes to a small percentage of users before full deployment.
Common mistake: Candidates often confuse Lambda triggers, proxy integrations, or separate functions with aliases, missing that only aliases natively support weighted traffic distribution between versions.
Expert Analysis
Understanding AWS Lambda Aliases and Weighted Traffic Routing
To safely deploy updates to an AWS Lambda function in production, developers can use Lambda aliases with weighted routing. An alias is a named pointer to a specific Lambda function version. Crucially, an alias can be configured to route a percentage of incoming traffic to one version and the remaining traffic to another version.
Why Option D is Correct
Option D correctly describes the process: 1. Update the code and publish a new version of the Lambda function. 2. Create or update a Lambda alias that points to the production version. 3. Configure traffic weights on the alias to send 90% of traffic to the current production version and 10% to the newly published version.
This is the native, AWS-recommended mechanism for canary deployments and gradual rollouts on Lambda.
Why the Other Options Are Incorrect
- Option A mentions configuring traffic weights on a Lambda function trigger. Triggers (such as S3, SQS, or DynamoDB) do not support weighted traffic splitting between versions. Traffic routing is a feature of aliases, not triggers.
- Option B suggests creating an entirely new Lambda function and pointing an alias to it. Aliases can only route traffic between versions of the same function, not between different functions.
- Option C refers to a Lambda proxy integration, which is an API Gateway concept. While API Gateway can route to different Lambda versions, the traffic splitting feature described in the question is natively handled by the Lambda alias itself, not the proxy integration.
Community Consensus
The community unanimously agrees on Option D, with multiple candidates confirming that Lambda aliases are the correct mechanism for weighted traffic distribution between function versions. The official AWS documentation on [Lambda aliases](https://docs.aws.amazon.com/lambda/latest/dg/configuration-aliases.html) explicitly supports this use case.
Official Reference
https://docs.aws.amazon.com/lambda/latest/dg/configuration-aliases.html
This link opens the official vendor documentation in a new tab.
Exam Strategy
When you see keywords like 'weighted traffic,' 'canary deployment,' or 'split traffic between versions' in Lambda questions, immediately think of Lambda aliases. Eliminate options mentioning triggers, separate functions, or proxy integrations, as they do not natively support version-level traffic weighting.
Community Votes
100% of anonymous learners picked answer D. Votes are pick records left by other test-takers — they are not the verified answer.
Discussion 4 contributions
Compiled from public community threads and reader submissions, lightly edited for clarity. Handles and vote tallies are shown as recorded, and comments reflect the views of individual contributors.
From public community threads 4
-
KarBiswa 👍 3 Answered Dhttps://docs.aws.amazon.com/lambda/latest/dg/configuration-aliases.html
-
CrescentShared 👍 4 Answered DD is correct.
-
65703c1 👍 2 Answered DD is the correct answer.
-
koltysh 👍 2answer is D
Reader comments & corrections
No reader corrections yet — spotted an error or have a note? Share it below.
Related Analysis
Practice All DVA-C02 Questions
Access 100 questions with complete answers and detailed explanations.
View Full DVA-C02 Practice Test →