During development, a mobile app calls a backend through API Gateway. For integration testing, the developer wants API Gateway to return different simulated backend responses without invoking the actual backend. Which approach provides this behavior with the least operational overhead?
Choose an answer
Tap an option to check your answer.
Correct answer: Use a request mapping template to select the mock integration response..
Why this is the answer
Using a request mapping template to select the mock integration response is the most efficient solution. API Gateway's mock integration feature allows you to define static responses directly within API Gateway without needing a backend. A request mapping template can then be used to determine which mock response to return based on the incoming request, providing dynamic simulation with minimal operational overhead. Creating a Lambda function adds unnecessary compute resources and management overhead for simply returning fixed responses. Launching an EC2 instance is overkill and introduces significant operational complexity for a testing scenario that doesn't require an actual backend. Customizing the API Gateway stage to choose a response type is not a standard feature for dynamic response selection within mock integrations; stages are primarily for deployment and configuration, not for conditional response logic.
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