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

A company has an Amazon API Gateway REST API that integrates with an AWS Lambda function. The API’s development stage references a development alias of the Lambda function named dev.

A developer needs make a production alias of the Lambda function named prod available through the API.

Which solution meets these requirements?

Answer options

Correct answer: C

Explanation

Deploying the API to a dedicated production stage and using stage variables allows the API to dynamically route requests to the correct Lambda function alias (prod) based on the stage. Configuring stage variables is the AWS-recommended pattern for managing different backend environments (like dev and prod) without modifying the API's core resource structure. Other options incorrectly attempt to define environment-specific routing at the method level or configure integration requests directly on a stage without variables.