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

A team has an Amazon API Gateway REST API that consists of a single resource and a GET method that is backed by an AWS Lambda integration.

A developer makes a change to the Lambda function and deploys the function as a new version. The developer needs to set up a process to test the new version of the function before using the new version in production. The tests must not affect the production REST API.

Which solution will meet these requirements with the LEAST operational overhead?

Answer options

Correct answer: B

Explanation

Using an API Gateway stage variable to dynamically reference the Lambda function version allows developers to route traffic to different function versions based on the stage (e.g., 'test' vs 'prod') with minimal configuration overhead. Options A and C require creating and managing redundant resources or entirely new APIs, which increases operational overhead. Option D is incorrect because updating the production integration directly would disrupt the active production API environment during testing.