Question 1 · choose 1
A front-end team needs to start testing against GET /orders/{id}, but the backend service that will serve it has not been built. Both teams have agreed on the response format. The developer wants a deployed API endpoint that returns a fixed sample order now, without deploying any backend code. What should the developer configure?
- AA Lambda proxy integration whose function returns a hard-coded sample order
- BAn HTTP API route with a mock integration that returns the sample
- CA REST API method with a mock integration that returns the sample
- DAPI caching on the stage, loaded once with the sample order
Show the answer and why
AA Lambda proxy integration whose function returns a hard-coded sample order
Incorrect
This would work, but it deploys backend code, the function, which the requirement rules out.
BAn HTTP API route with a mock integration that returns the sample
Incorrect
Mock integrations are a REST API feature. HTTP APIs do not support them.
CA REST API method with a mock integration that returns the sample
Correct
A mock integration lets API Gateway generate the response itself, with no backend, which unblocks teams that depend on the API.
DAPI caching on the stage, loaded once with the sample order
Incorrect
API caching stores responses that come back from the endpoint for a TTL, so there must be an endpoint to call in the first place.
REST API mock integrations return responses defined in API Gateway, which is a common way to test clients before the backend exists.
AWS documentation