AWS Certified Developer – Associate (DVA-C02) — Question 229
A developer is planning to use an Amazon API Gateway and AWS Lambda to provide a REST API. The developer will have three distinct environments to manage: development, test, and production.
How should the application be deployed while minimizing the number of resources to manage?
Answer options
- A. Create a separate API Gateway and separate Lambda function for each environment in the same Region.
- B. Assign a Region for each environment and deploy API Gateway and Lambda to each Region.
- C. Create one API Gateway with multiple stages with one Lambda function with multiple aliases.
- D. Create one API Gateway and one Lambda function, and use a REST parameter to identify the environment.
Correct answer: C
Explanation
The correct answer is C because using one API Gateway with multiple stages and a single Lambda function with aliases allows for efficient resource management while still providing the necessary separation for different environments. Options A and B create redundant resources, increasing management complexity, while option D does not provide a clean separation of environments, which can lead to potential conflicts.