DVA-C02 · Question #152
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
The correct answer is A. Set up a mock integration for API methods in API Gateway. In the integration request from. "API Gateway supports mock integrations for API methods" "As an API developer, you decide how API Gateway responds to a mock integration request. For this, you configure the method's integration request and integration response to associate a response with a given status code. "
Question
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?
Options
- ASet up a mock integration for API methods in API Gateway. In the integration request from
- BCreate two mock integration resources for API methods in API Gateway. In the integration
- CCreate Lambda functions to perform tests. Add simple logic to return either success or error,
- DCreate a Lambda function to perform tests. Add simple logic to return either success or error-
How the community answered
(29 responses)- A76% (22)
- B7% (2)
- C14% (4)
- D3% (1)
Explanation
"API Gateway supports mock integrations for API methods" "As an API developer, you decide how API Gateway responds to a mock integration request. For this, you configure the method's integration request and integration response to associate a response with a given status code. " https://docs.aws.amazon.com/apigateway/latest/developerguide/how-to-mock-integration.html
Community Discussion
No community discussion yet for this question.