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

A company has a serverless application that uses Amazon API Gateway backed by AWS Lambda proxy integration. The company is developing several backend APIs. The company needs a landing page to provide an overview of navigation to the APIs.

A developer creates a new/LandingPage resource and a new GET method that uses mock integration.

What should the developer do next to meet these requirements?

Answer options

Correct answer: C

Explanation

For an Amazon API Gateway mock integration, the integration request mapping template must be configured with a Content-Type of application/json and return a statusCode of 200 to instruct API Gateway on how to handle the simulated backend request. The actual HTML response content must be defined in the integration response mapping template with a Content-Type of text/html so that the client's browser renders it as a web page. Other configurations incorrectly place the statusCode or the HTML payload, which would result in failed requests or incorrect rendering.