How to configure traffic shifting between Lambda versions?
A developer uses an AWS Lambda function in an application to edit users' uploaded photos. The developer needs to update the Lambda function code and needs to test the updates. For testing, the developer must divide the user traffic between the original version of the Lambda function and the new version of the Lambda function. Which combination of steps will meet these requirements? (Choose two.)
Community Votes
100% of anonymous learners picked answer AD. Votes are pick records left by other test-takers — they are not the verified answer.
Community Insight
The exam tests the specific workflow of publishing versions to enable immutability, followed by configuring an alias with routing weights to split traffic.
To test updates by dividing traffic, developers must publish versions of the Lambda function and use a weighted alias. This method allows for canary releases by routing a percentage of requests to the new version.
Selecting Option B is a frequent error, as users mistakenly attribute traffic routing capabilities to CodeBuild instead of Lambda aliases or CodeDeploy.
Community Discussion (3 comments)
Comments & Corrections
No comments yet — spotted an error or have a note? Share it below.
Expert Analysis
Why the Answer Is Correct
Option A is correct because traffic shifting requires immutable versions; you must publish the current state as a version before making changes, then publish the new code as a second version. Option D is correct because AWS Lambda aliases support routing configuration, allowing you to assign a percentage of traffic to a secondary version while the primary version handles the rest. Together, these steps create a standard canary release strategy.Why the Other Options Are Wrong
Option B is incorrect because AWS CodeBuild is a build service for compiling and testing code, not a service for managing runtime traffic routing between Lambda versions. Option C is incorrect because adding function URLs creates separate endpoints rather than a single entry point that splits traffic internally. Option E is incorrect because Lambda aliases point to function versions ($LATEST or numbered versions), not to function URLs.Community Comment Notes
The community consensus strongly supports AD, with users explicitly referencing the AWS CLI commandupdate-alias and the --routing-config parameter. Comments confirm that the weighted alias configuration is the specific mechanism required to meet the requirement of dividing traffic between the two published versions. Official Reference
Exam Strategy
Remember the sequence for Lambda traffic shifting: first publish versions to create immutable snapshots, then create or update an alias with routing configuration to distribute the traffic percentages.
Related Analysis
Practice All DVA-C02 Questions
Access 100 questions with complete answers and detailed explanations.
View Full DVA-C02 Practice Test →