Q99 — AWS DVA-C02 Ch.2
Question 99 of 100 | ← Chapter 2
A company uses Amazon API Gateway to develop APIs for its AWS-based application. A developer needs to test and generate API responses. Other teams need to immediately test the API. What should the developer do to meet these requirements?
- A. Set up a mock integration request in API Gateway. Configure the method’s integration request and integration response to associate responses with given status codes. ✓
- B. Set up a request validator in the API’s OpenAPI definition file. Import the OpenAPI definition into API Gateway to test the API.
- C. Set up a gateway response in API Gateway. Configure response headers using hardcoded HTTP status codes and responses.
- D. Set up a Lambda authorizer based on request parameters to control access to the API. Configure the Lambda function with required mapping templates.
Correct Answer: A. Set up a mock integration request in API Gateway. Configure the method’s integration request and integration response to associate responses with given status codes.
Explanation
Option A: Using a mock integration request enables developers to define a virtual backend for the API, allowing them to test the API and generate responses without impacting the actual backend service. This allows other teams to immediately test the API without waiting for the real backend to be ready.