Q44 — AWS DVA-C02 Ch.2

Question 44 of 100 | ← Chapter 2

A developer is optimizing an AWS Lambda function and wants to test these changes on a subset of production traffic. The Lambda function serves requests for a REST API in Amazon API Gateway. The developer needs to deploy their changes for testing in production without changing the API Gateway URL. Which solution meets these requirements?

Correct Answer: C. Define an alias on the Lambda function’s $LATEST version. Update the API Gateway endpoint to reference the new Lambda function alias. Upload and publish the optimized Lambda function code. In the production API Gateway stage, define a canary release and configure traffic percentage to route to the canary. Update the API Gateway endpoint to use the Lambda function’s $LATEST version. Deploy to the canary stage.

Explanation

Option C describes defining an alias on the Lambda function’s $LATEST version, ensuring seamless replacement of the $LATEST version with the new optimized version. Then, configuring a canary release in API Gateway routes a portion of traffic to the new version, enabling production testing without impacting all traffic. Option A incorrectly updates the API Gateway endpoint to reference a version instead of an alias. Option B also deploys directly to a new version rather than using an alias. Option D deploys directly to production without any canary mechanism. Therefore, option C best satisfies the requirements. 【Lantern Certification provided by: swufelp1999】