DVA-C02 · Question #787
A company is building a single-page application. An AWS Lambda function runs the backend logic. The company wants to use Amazon API Gateway to deploy a single API across multiple environments. Which c
The correct answer is D. Create a route to define the HTTP method and path for the API. Create and attach an integration E. Invoke the backend integration dynamically by creating a stage variable to hold the function. To use one API across multiple environments in API Gateway, you define the API’s routes (HTTP method + path) and attach an integration that invokes your Lambda backend. Then you create separate stages for each environment (for example, dev/test/prod) and use stage variables to dy
Question
A company is building a single-page application. An AWS Lambda function runs the backend logic. The company wants to use Amazon API Gateway to deploy a single API across multiple environments. Which combination of steps will meet these requirements? (Choose two.)
Options
- AEnable HTTP integrations for REST APIs in API Gateway by using the HTTP proxy integration.
- BEnable HTTP integrations for WebSocket APIs in API Gateway by using the HTTP proxy
- CCreate an Amazon CloudFront web distribution. Enter the invoke URL for the API as the origin
- DCreate a route to define the HTTP method and path for the API. Create and attach an integration
- EInvoke the backend integration dynamically by creating a stage variable to hold the function
How the community answered
(58 responses)- A22% (13)
- B5% (3)
- C14% (8)
- D59% (34)
Explanation
To use one API across multiple environments in API Gateway, you define the API’s routes (HTTP method + path) and attach an integration that invokes your Lambda backend. Then you create separate stages for each environment (for example, dev/test/prod) and use stage variables to dynamically select the correct Lambda target per stage, so the same API definition can point to different environment-specific backends.
Community Discussion
No community discussion yet for this question.