A batch processing application uses API Gateway endpoints with deployment stages for dev, UAT, and prod. The development team needs each stage’s API to call different third-party service endpoints (one endpoint per stage). Which solution lets the team configure stage-specific endpoints?
Choose an answer
Tap an option to check your answer.
Correct answer: Store the third-party service endpoints in API Gateway stage variables that match each stage..
Why this is the answer
API Gateway stage variables are designed precisely for this scenario. They allow you to define key-value pairs specific to each deployment stage (dev, UAT, prod). These variables can then be referenced in your API Gateway integration requests to dynamically change the backend endpoint URL, HTTP headers, or query parameters based on the stage. This provides a clean, built-in mechanism for stage-specific configurations. Storing endpoints in Lambda layers is incorrect because Lambda layers are for sharing code and dependencies, not for dynamic configuration values that change per API Gateway stage. Using query string parameters is insecure and impractical for backend service endpoints, as it exposes internal configuration and requires the client to know stage-specific details. While AWS AppConfig can manage configurations, API Gateway stage variables offer a more direct and integrated solution for stage-specific endpoint management within API Gateway itself.
Pass your exam — without the endless answer hunt
Get every verified question and explanation for this exam in one place, and save hours of prep. 1,000+ certifications · 20+ languages · free to start.
Pass your exam faster → No card needed