Q1 — AWS DVA-C02 Ch.2

Question 1 of 100 | ← Chapter 2

A developer is building an application that interacts with an AWS Lambda backend via an Amazon API Gateway API. The frontend team needs immediate access to the API endpoints to build the user interface. To prepare the backend for integration, the developer must configure endpoints that return predefined HTTP status codes and JSON responses to the frontend team. The developer has created a mock resource for the API. Which solution meets these requirements?

Correct Answer: B. Set the integration type to MOCK. Configure the method’s integration request and integration response to associate JSON responses with specific HTTP status codes.

Explanation

Option B describes using the MOCK integration type, meaning API Gateway simulates the backend service and allows defining mock responses directly within API Gateway. By configuring the method’s integration request and integration response, you can explicitly associate JSON responses with specific HTTP status codes. This enables the developer to provide immediately usable API endpoints for the frontend team to build the UI while fulfilling the requirement for predefined HTTP status codes and JSON responses.