AWS Certified Developer – Associate (DVA-C02) — Question 444

A developer is updating the code for an AWS Lambda function to add new capabilities. The Lambda function has version aliases for production and development environments that run separate versions of the function. The developer needs to configure a staging environment for the Lambda function to handle invocations to both the development version and the production version.

Which solution will meet these requirements?

Answer options

Correct answer: A

Explanation

AWS Lambda allows you to shift traffic between two versions of a function by using a weighted alias, which is perfect for staging and testing new code alongside production. Network Load Balancers and CodeDeploy linear deployments do not directly support routing a split percentage of traffic to specific function versions in this static staging manner. Resource tags are only metadata and cannot be used to control execution flow or route traffic between different function versions.