AWS Certified Developer – Associate (DVA-C02) — Question 266

A developer is building an application that will use an Amazon API Gateway API with an AWS Lambda backend. The team that will develop the frontend requires immediate access to the API endpoints to build the UI. To prepare the backend application for integration, the developer needs to set up endpoints. The endpoints need to return predefined HTTP status codes and JSON responses for the frontend team. The developer creates a method for an API resource.

Which solution will meet these requirements?

Answer options

Correct answer: B

Explanation

Using a MOCK integration in Amazon API Gateway allows developers to return API responses directly from the gateway without invoking a backend service like AWS Lambda. To set this up properly, the developer must configure the integration request to return the desired HTTP status code and define the mock JSON payload within the integration response. Option D is incorrect because the mock JSON response body must be defined in the integration response rather than the integration request.