AWS Certified Developer – Associate (DVA-C02) — Question 282
A company is building a new application that runs on AWS and uses Amazon API Gateway to expose APIs. Teams of developers are working on separate components of the application in parallel. The company wants to publish an API without an integrated backend so that teams that depend on the application backend can continue the development work before the API backend development is complete.
Which solution will meet these requirements?
Answer options
- A. Create API Gateway resources and set the integration type value to MOCK. Configure the method integration request and integration response to associate a response with an HTTP status code. Create an API Gateway stage and deploy the API.
- B. Create an AWS Lambda function that returns mocked responses and various HTTP status codes. Create API Gateway resources and set the integration type value to AWS_PROXY. Deploy the API.
- C. Create an EC2 application that returns mocked HTTP responses. Create API Gateway resources and set the integration type value to AWS. Create an API Gateway stage and deploy the API.
- D. Create API Gateway resources and set the integration type value set to HTTP_PROXY. Add mapping templates and deploy the API. Create an AWS Lambda layer that returns various HTTP status codes. Associate the Lambda layer with the API deployment.
Correct answer: A
Explanation
Amazon API Gateway natively supports a MOCK integration type, which allows developers to return simulated API responses directly from the API Gateway without routing the request to any backend service. This enables dependent teams to continue their development work in parallel before the actual backend integration is complete. Other solutions involving AWS Lambda, Amazon EC2, or HTTP_PROXY integrations introduce unnecessary infrastructure overhead and development effort.