DVA-C02 · Question #419
DVA-C02 Question #419: Real Exam Question with Answer & Explanation
The correct answer is A: Publish a version of the original Lambda function. Make the necessary changes to the Lambda. Lambda's traffic-splitting capability requires two things working together: published versions (immutable snapshots of your code) and aliases with weighted routing. Option A is correct because you must first publish the original code as a numbered version before you can reference
Question
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.)
Options
- APublish a version of the original Lambda function. Make the necessary changes to the Lambda
- BUse AWS CodeBuild to detect updates to the Lambda function. Configure CodeBuild to
- CUpdate the original version of the Lambda function to add a function URL. Make the necessary
- DCreate an alias that points to the original version of the Lambda function. Configure the alias to be
- ECreate an alias that points to the original function URL. Configure the alias to be a weighted alias
Explanation
Lambda's traffic-splitting capability requires two things working together: published versions (immutable snapshots of your code) and aliases with weighted routing. Option A is correct because you must first publish the original code as a numbered version before you can reference it alongside a new version - $LATEST alone cannot be weighted. Option D is correct because Lambda aliases natively support weighted routing, letting you direct, say, 90% of traffic to v1 and 10% to v2 through a single alias endpoint.
Why the distractors fail:
- B (CodeBuild) - CodeBuild is a build/CI tool, not a traffic routing mechanism; it has no capability to split Lambda invocation traffic.
- C (Function URL on original version) - Function URLs are direct HTTPS endpoints scoped to a single function or alias; they do not support weighted splitting between two distinct versions.
- E (Alias pointing to a function URL) - Aliases point to Lambda versions (numbered snapshots), never to function URLs; this is a category confusion - the two concepts are not interchangeable.
Memory tip: Think "Publish, then point an Alias" - you can't split traffic without first freezing a version, and only an alias (not a URL) carries the weighted routing config. If an answer involves CodeBuild or function URLs for traffic splitting, it's a distractor.
Topics
Community Discussion
No community discussion yet for this question.