A developer is preparing an Amazon API Gateway API (with a Lambda backend) so frontend teams can start building the UI before the backend is implemented. The frontend team needs endpoints that return predefined HTTP status codes and JSON bodies. The developer created a method for an API resource. Which approach fulfills these requirements?
Choose an answer
Tap an option to check your answer.
Correct answer: Set the integration type to MOCK and configure the method's integration request and integration response to map JSON responses to specific HTTP status codes..
Why this is the answer
The MOCK integration type in API Gateway is specifically designed for scenarios where you need to simulate API responses without a backend. It allows you to define static responses directly within API Gateway. You configure the integration request and integration response to map desired HTTP status codes and JSON bodies, fulfilling the requirement for predefined responses. AWSPROXY integration requires a Lambda function to process requests and return responses, which is not ideal for pre-implementation UI development. HTTPPROXY integration forwards requests to another HTTP endpoint, also requiring an external service. While MOCK is correct, the last option incorrectly separates the definition of HTTP status codes and JSON responses; both are handled within the integration request and response mapping in a MOCK integration.
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