ExamGecko
Question list
Search
Search

List of questions

Search

Related questions











Question 58 - DVA-C02 discussion

Report
Export

A developer is creating a mobile app that calls a backend service by using an Amazon API Gateway REST API. For integration testing during the development phase, the developer wants to simulate different backend responses without invoking the backend service.

Which solution will meet these requirements with the LEAST operational overhead?

A.
Create an AWS Lambda function. Use API Gateway proxy integration to return constant HTTP responses.
Answers
A.
Create an AWS Lambda function. Use API Gateway proxy integration to return constant HTTP responses.
B.
Create an Amazon EC2 instance that serves the backend REST API by using an AWS CloudFormation template.
Answers
B.
Create an Amazon EC2 instance that serves the backend REST API by using an AWS CloudFormation template.
C.
Customize the API Gateway stage to select a response type based on the request.
Answers
C.
Customize the API Gateway stage to select a response type based on the request.
D.
Use a request mapping template to select the mock integration response.
Answers
D.
Use a request mapping template to select the mock integration response.
Suggested answer: D

Explanation:

Amazon API Gateway supports mock integration responses, which are predefined responses that can be returned without sending requests to a backend service. Mock integration responses can be used for testing or prototyping purposes, or for simulating different backend responses based on certain conditions. A request mapping template can be used to select a mock integration response based on an expression that evaluates some aspects of the request, such as headers, query strings, or body content. This solution does not require any additional resources or code changes and has the least operational overhead. Reference: Set up mock integrations for an API Gateway REST API

https://docs.aws.amazon.com/apigateway/latest/developerguide/how-to-mock-integration.html

asked 16/09/2024
Jess Kendrick Gamboa
35 questions
User
Your answer:
0 comments
Sorted by

Leave a comment first