A company is deploying a serverless application that uses Amazon API Gateway and Lambda to development, test, and production environments. Which option requires the least development effort to support multiple environments?
Choose an answer
Tap an option to check your answer.
Correct answer: Use API Gateway stage variables and create Lambda aliases so stage-specific resources are referenced by stage..
Why this is the answer
Using API Gateway stage variables and Lambda aliases is the most efficient approach. Stage variables allow you to define environment-specific configuration values (like database endpoints or S3 bucket names) that can be referenced within your API Gateway integration requests. Lambda aliases provide stable endpoints for different versions of your Lambda functions (e.g., dev, test, prod), allowing you to update the underlying function code without changing the alias. This combination enables a single API Gateway deployment to serve multiple environments by dynamically pointing to the correct backend resources based on the stage, minimizing code duplication and deployment complexity. ECS and Elastic Beanstalk are container orchestration and platform-as-a-service solutions, respectively, and are not serverless and would introduce significant overhead for a serverless application. Duplicating application code is inefficient and prone to errors.
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