DVA-C02 · Question #278
A company is building a new application that runs on AWS and uses Amazon API Gateway to expose APIs. Teams of developers are working on separate components of the application in parallel. The company
The correct answer is A. Create API Gateway resources and set the integration type value to MOCK. Configure the. API Gateway's MOCK integration type allows teams to define request/response mappings without a real backend, enabling parallel frontend and backend development.
Question
A company is building a new application that runs on AWS and uses Amazon API Gateway to expose APIs. Teams of developers are working on separate components of the application in parallel. The company wants to publish an API without an integrated backend so that teams that depend on the application backend can continue the development work before the API backend development is complete. Which solution will meet these requirements?
Options
- ACreate API Gateway resources and set the integration type value to MOCK. Configure the
- BCreate an AWS Lambda function that returns mocked responses and various HTTP status codes.
- CCreate an EC2 application that returns mocked HTTP responses. Create API Gateway resources
- DCreate API Gateway resources and set the integration type value set to HTTP_PROXY. Add
How the community answered
(32 responses)- A78% (25)
- B13% (4)
- C3% (1)
- D6% (2)
Why each option
API Gateway's MOCK integration type allows teams to define request/response mappings without a real backend, enabling parallel frontend and backend development.
Setting the integration type to MOCK in API Gateway allows the API to return a predefined response directly from the gateway itself, with no backend endpoint required. This enables dependent teams to code against a real API contract while backend development continues independently. Integration request/response mappings can simulate any HTTP status code and response body.
Using a Lambda function adds unnecessary cost and operational overhead; the MOCK integration type achieves the same result natively within API Gateway without any compute resources.
Provisioning an EC2 instance to return mock responses is operationally expensive and complex compared to the built-in MOCK integration, which requires no additional infrastructure.
HTTP_PROXY routes requests to an actual external HTTP endpoint, which means a real backend must already exist - this does not solve the problem of developing without an integrated backend.
Concept tested: API Gateway MOCK integration type for decoupled development
Source: https://docs.aws.amazon.com/apigateway/latest/developerguide/how-to-mock-integration.html
Community Discussion
No community discussion yet for this question.