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

A company runs a batch processing application by using AWS Lambda functions and Amazon API Gateway APIs with deployment stages for development, user acceptance testing, and production. A development team needs to configure the APIs in the deployment stages to connect to third-party service endpoints.

Which solution will meet this requirement?

Answer options

Correct answer: B

Explanation

API Gateway stage variables act as environment variables and can be configured to dynamically pass different values, such as third-party endpoints, to backend Lambda functions depending on the active stage. Using Lambda layers or query parameters for environment-specific endpoints is inefficient and introduces security and maintenance overhead. While AWS AppConfig can manage configurations, API Gateway stage variables are the native and simplest way to parameterize stage-specific endpoints directly within API Gateway.