Which solution will meet these requirements with the LEAST operational overhead?
Create an AWS Lambda function. Use API Gateway proxy integration to return constant HTTP responses.
Create an Amazon EC2 instance that serves the backend REST API by using an AWS CloudFormation template.
Customize the API Gateway stage to select a response type based on the request.
Use a request mapping template to select the mock integration response.
Explanations:
While using an AWS Lambda function for API Gateway proxy integration could simulate responses, it introduces more operational overhead by requiring the management and deployment of a Lambda function, which is unnecessary for simple response simulation.
Creating an Amazon EC2 instance to serve the backend API requires additional infrastructure management, maintenance, and operational overhead. This approach is more complex than needed for simulating responses during development.
Customizing the API Gateway stage to select response types is feasible, but it can be complex to manage and may require additional configurations. It does not specifically provide a lightweight way to simulate responses with minimal overhead.
Using a request mapping template in API Gateway allows for easily defining mock integration responses directly within API Gateway. This solution has the least operational overhead since it requires no additional infrastructure or services and can be configured directly in the API Gateway console.