
Answer-first summary for fast verification
Answer: Mock API methods in API Gateway, configure method's integration request and response to simulate success or error status codes with corresponding messages.
Option A is the correct answer because setting up a mock integration for API methods in API Gateway allows for quickly simulating backend logic without the need for actual Lambda functions. This approach involves configuring the method's integration request and response to return predefined success or error status codes along with corresponding messages, which meets the requirement with the least effort. Mock integrations are ideal for testing various scenarios as they enable you to define behavior and responses directly within API Gateway.
Author: LeetQuiz Editorial Team
Ultimate access to all questions.
In a serverless multi-tier application development on AWS using Amazon API Gateway and AWS Lambda, what is the least effort solution for a frontend developer to create integration tests covering both positive and negative HTTP status code scenarios?
A
Mock API methods in API Gateway, configure method's integration request and response to simulate success or error status codes with corresponding messages.
B
Utilize two mock integration resources in API Gateway, one for success and one for error status codes, with appropriate messages for each.
C
Develop Lambda functions for testing, integrate with API Gateway, and select functions based on the required HTTP status codes for success or error.
D
Develop a single Lambda function for testing, create a mock integration in API Gateway, and use the function to simulate both success and error status codes.
No comments yet.