Q40 — AWS DVA-C02 Ch.3
Question 40 of 100 | ← Chapter 3
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 traffic between the existing version and the new version of the Lambda function. Which solution satisfies these requirements?
- A. Configure a weighted routing policy in Amazon Route 53. Associate the Lambda function versions with the weighted routing policy.
- B. Create a function alias. Configure the alias to split traffic between two Lambda function versions. ✓
- C. Create an Application Load Balancer (ALB) with the Lambda function as a target. Configure the ALB to split traffic between two Lambda function versions.
- D. Create the new version of the Lambda function as a Lambda layer on top of the existing version. Configure the function to split traffic between the two layers.
Correct Answer: B. Create a function alias. Configure the alias to split traffic between two Lambda function versions.
Explanation
In AWS Lambda, aliases can be used to split traffic between different function versions. An alias is a pointer to a specific Lambda function version. By creating an alias and configuring it to split traffic between two Lambda function versions, developers can reduce risk, test the new version, and gradually shift traffic. Other options: A — Configuring a weighted routing policy in Amazon Route 53 is not directly tied to Lambda function versions. C — Using an ALB as a target introduces an unnecessary load-balancing layer and is not a direct solution for version-based traffic splitting. D — Creating a new version as a Lambda layer is intended for sharing code and resources—not for traffic splitting.