AWS Certified Developer – Associate — Question 101
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 a Lambda function, enabling controlled testing. Option A is incorrect as Route 53 does not directly manage Lambda versions; option C is not suitable since ALB does not support Lambda version traffic splitting; option D is incorrect because Lambda layers are not designed for version traffic splitting.