AWS Certified Developer – Associate (DVA-C02) — Question 233
A developer wants to reduce risk when deploying a new version of an existing AWS Lambda function. To test the Lambda function, the developer needs to split the traffic between the existing version and the new version of the Lambda function.
Which solution will meet these requirements?
Answer options
- A. Configure a weighted routing policy in Amazon Route 53. Associate the versions of the Lambda function with the weighted routing policy.
- B. Create a function alias. Configure the alias to split the traffic between the two versions of the Lambda function.
- C. Create an Application Load Balancer (ALB) that uses the Lambda function as a target. Configure the ALB to split the traffic between the two versions of the Lambda function.
- D. Create the new version of the Lambda function as a Lambda layer on the existing version. Configure the function to split the traffic between the two layers.
Correct answer: B
Explanation
The correct answer is B because creating a function alias allows for traffic splitting between different versions of the Lambda function easily. Option A is incorrect as Route 53 is not typically used for Lambda traffic management. Option C involves using an ALB, which is not necessary for managing Lambda versions. Option D misuses Lambda layers, which are not intended for traffic distribution between function versions.