You plan to expose a REST API using Amazon API Gateway and AWS Lambda across three environments: development, test, and production. How should you deploy to minimize the number of resources to manage?
Choose an answer
Tap an option to check your answer.
Correct answer: Use a single API Gateway with multiple stages and one Lambda function that has multiple aliases..
Why this is the answer
Using a single API Gateway with multiple stages (e.g., dev, test, prod) and one Lambda function with multiple aliases (e.g., dev, test, prod) is the most efficient approach. API Gateway stages allow you to manage different deployment versions of your API, each pointing to a specific Lambda alias. Lambda aliases enable different versions of your function code to be invoked based on the alias, facilitating independent testing and deployment without duplicating resources. This minimizes resource management overhead and cost. Creating separate API Gateways and Lambda functions for each environment increases management complexity and cost. Using separate AWS Regions is unnecessary and significantly increases latency, complexity, and cost. Passing the environment as a REST parameter would require conditional logic within a single Lambda function, making deployments and rollbacks more complex and error-prone compared to using aliases.
Pass your exam — without the endless answer hunt
Get every verified question and explanation for this exam in one place, and save hours of prep. 1,000+ certifications · 20+ languages · free to start.
Pass your exam faster → No card needed