How to Mock API Gateway Endpoints for Frontend Development?
Short answer
B Set the integration type to MOCK. Configure the method's integration request and integration response to associate a JSON responses with specific HTTP status codes.
Question
Key Takeaways
This question tests knowledge of API Gateway MOCK integration type and the correct mapping layers: integration request defines the JSON response template, while integration response maps it to specific HTTP status codes.
To provide predefined HTTP status codes and JSON responses without a real backend, use API Gateway MOCK integration with configured integration request and integration response mappings. This enables frontend teams to develop against stable API contracts immediately.
Common mistake: Candidates often choose option D, confusing method request with integration request. Method request defines parameters (headers, query strings, path params) for the client-facing interface, while integration request transforms the request sent to the backend or defines mock response templates.
Expert Analysis
Understanding the Requirement
The scenario requires predefined HTTP status codes and JSON responses without an actual backend. This is a classic use case for MOCK integration in Amazon API Gateway, which allows you to simulate API behavior during frontend development.
Why Option B is Correct
Option B correctly identifies two critical steps:
1. Set integration type to MOCK — This tells API Gateway to respond without invoking any backend service. 2. Configure integration request and integration response — In a MOCK integration: - The integration request defines the static JSON response template (the body). - The integration response maps that response to a specific HTTP status code (e.g., 200, 404, 500) based on conditions or default mappings.
This two-layer mapping is exactly how MOCK integrations work in API Gateway.
Why Option D is Wrong
Option D incorrectly states that method request defines HTTP status codes. This is a fundamental misunderstanding:
- Method request defines the client-facing contract: required headers, query string parameters, path parameters, and request body schema. It does not define HTTP status codes or response bodies.
- Integration response is where HTTP status codes are mapped and returned to the client.
Why Options A and C are Wrong
- Option A (AWS_PROXY): Requires provisioning actual Lambda functions, which contradicts the requirement for predefined responses without backend development.
- Option C (HTTP_PROXY): Requires an external placeholder API, adding unnecessary infrastructure and complexity when MOCK integration serves the purpose perfectly.
Community Consensus
The community unanimously agrees on Option B (100% vote distribution), confirming that MOCK integration with proper integration request/response configuration is the standard approach for this scenario.
Official Reference
https://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-api-integration-types.html
This link opens the official vendor documentation in a new tab.
Exam Strategy
When you see keywords like 'predefined responses,' 'mock,' or 'frontend needs endpoints before backend is ready,' immediately think MOCK integration. Remember the mapping hierarchy: method request/response defines the client interface, while integration request/response handles backend communication or mock response templates.
Community Votes
100% of anonymous learners picked answer B. Votes are pick records left by other test-takers — they are not the verified answer.
Discussion 4 contributions
Compiled from public community threads and reader submissions, lightly edited for clarity. Handles and vote tallies are shown as recorded, and comments reflect the views of individual contributors.
From public community threads 4
-
KarBiswa 👍 2 Answered Bhttps://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-api-integration-types.html#:~:text=MOCK%3A%20This%20type,of%20an%20API.
-
tgv 👍 4 Answered Bthe correct answer is B
-
65703c1 👍 2 Answered BB is the correct answer.
-
ANDRES715 👍 1 Answered BYou.com
Reader comments & corrections
No reader corrections yet — spotted an error or have a note? Share it below.
Related Analysis
Practice All DVA-C02 Questions
Access 100 questions with complete answers and detailed explanations.
View Full DVA-C02 Practice Test →