A company is developing a serverless multi-tier application on AWS. The company will build the serverless logic tier by using Amazon API Gateway and AWS Lambda. While the company builds the logic tier, a developer who works on the frontend of the application must develop integration tests. The tests must cover both positive and negative scenarios, depending on success and error HTTP status codes. Which solution will meet these requirements with the LEAST effort?
Select one answer.
Marked answer: A
Community Discussion
Written by other learners. Comments can disagree with the marked answer — check the official documentation when in doubt.
Chose A1
B - resource should not be used as such.. One Request should fulfill both success and fail scenario. Another resource means it's not the same request
Chose A1
A is the correct answer.
Chose A2
This is an efficient solution. Mock integrations in API Gateway allow you to simulate backend logic directly within API Gateway, without the need for an actual backend like Lambda. You can define the behavior and response (including HTTP status codes and messages) directly in API Gateway, making it ideal for quickly developing and testing various scenarios.