Which solution will meet these requirements?
Configure a weighted routing policy in Amazon Route 53. Associate the versions of the Lambda function with the weighted routing policy.
Create a function alias. Configure the alias to split the traffic between the two versions of the Lambda function.
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.
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.
Explanations:
Amazon Route 53 is a DNS service, and it cannot directly manage traffic routing between versions of a Lambda function. It is used for routing web traffic, not Lambda function versions.
Lambda aliases allow traffic splitting between different versions of a Lambda function. You can configure an alias to route a specified percentage of traffic to each version, fulfilling the requirement to test the new version.
An Application Load Balancer (ALB) is typically used for routing traffic to EC2 instances, containers, or Lambda functions in specific cases. However, it doesn’t handle traffic routing between different versions of a Lambda function.
Lambda layers are used to share common code or libraries across multiple Lambda functions. They do not facilitate traffic splitting between versions of a Lambda function.