A Lambda function has production and development version aliases. A developer needs a staging setup to route traffic to both the development and production versions for testing. Which solution will enable that behavior?
Choose an answer
Tap an option to check your answer.
Correct answer: Create a weighted alias that references the production version and the updated (staging) version of the function..
Why this is the answer
A weighted alias allows you to route a specified percentage of traffic to different versions of a Lambda function. By creating a new alias (e.g., "staging") and configuring it to reference both the production version and the updated (staging) version with desired weights (e.g., 90% to production, 10% to staging), you can effectively test the new code with a subset of live traffic. Network Load Balancers are not used directly with Lambda functions for traffic shifting between versions; API Gateway or Application Load Balancers can integrate with Lambda, but weighted aliases are the native and most direct solution for this use case. AWS CodeDeploy can perform linear traffic shifting, but it's typically used for deploying new versions and managing the rollout, not for persistent staging traffic distribution between two existing versions. Tags are metadata and do not control traffic routing.
Pass your exam — without the endless answer hunt
Get every verified question and explanation for this exam in one place, and save hours of prep. 1,000+ certifications · 20+ languages · free to start.
Pass your exam faster → No card needed