A developer is deploying updated Lambda code that tracks user online activity. The web application invokes the Lambda via the AWS SDK. The developer wants only a small percentage of SDK-invoked requests to call the new code while most continue to call the original code. Which approach satisfies this requirement?
Choose an answer
Tap an option to check your answer.
Correct answer: Create an alias for the Lambda function and configure the alias with a weight directing a specific percentage to the updated version..
Why this is the answer
Creating an alias for the Lambda function and configuring it with weighted routing is the correct approach. This allows you to direct a specified percentage of invocations to a new Lambda version while the remaining percentage goes to the original version. This is ideal for canary deployments or gradual rollouts. Creating a Lambda version alone does not provide the weighted routing capability; it simply creates a snapshot of your code. Application Load Balancers and Network Load Balancers are used for distributing traffic to EC2 instances, containers, or IP addresses, not directly for weighted routing between different Lambda function versions invoked via the AWS SDK. While ALBs can invoke Lambda functions, the question specifies SDK invocation, and the weighted routing for Lambda versions is handled directly through Lambda aliases.
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