How to Implement Weighted Traffic Routing for AWS Lambda Versions?

A developer is updating the production version of an AWS Lambda function to fix a defect. The developer has tested the updated code in a test environment. The developer wants to slowly roll out the updates to a small subset of production users before rolling out the changes to all users. Only 10% of the users should be initially exposed to the new code in production. Which solution will meet these requirements?

  1. Update the Lambda code and create a new version of the Lambda function. Create a Lambda function trigger. Configure the traffic weights in the trigger 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.
  2. Create a new Lambda function that uses the updated code. Create a Lambda alias for the production Lambda function. Configure the Lambda alias to send 90% of the traffic to the production Lambda function, and send 10% of the traffic to the test Lambda function.
  3. Update the Lambda code and create a new version of the Lambda function. Create a Lambda proxy integration. Configure the Lambda proxy to split traffic 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.
  4. 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. Source Reference Answer

Community Votes

D
100%

100% of anonymous learners picked answer D. Votes are pick records left by other test-takers — they are not the verified answer.

Community Insight

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.

Candidates often confuse Lambda triggers, proxy integrations, or separate functions with aliases, missing that only aliases natively support weighted traffic distribution between versions.

Community Discussion (4 comments)

65703c1 👍 2 Selected: D
D is the correct answer.
KarBiswa 👍 3 Selected: D
https://docs.aws.amazon.com/lambda/latest/dg/configuration-aliases.html
koltysh 👍 2
answer is D
CrescentShared 👍 4 Selected: D
D is correct.

Comments & Corrections

No comments yet — spotted an error or have a note? Share it below.

Log in to comment, report an error, or add a note about this question.

Submitted for moderation before publishing. Keep it helpful and respectful.

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

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.

Related Analysis

Practice All DVA-C02 Questions

Access 100 questions with complete answers and detailed explanations.

View Full DVA-C02 Practice Test →

← Back to DVA-C02 Study Guide