AWS Certified Developer – Associate (DVA-C02) — Question 546

A company is building a serverless application on AWS. The application uses Amazon API Gateway and AWS Lambda. The company wants to deploy the application to its development, test, and production environments.

Which solution will meet these requirements with the LEAST development effort?

Answer options

Correct answer: A

Explanation

Using API Gateway stage variables combined with AWS Lambda aliases allows developers to route traffic to different versions of a Lambda function depending on the environment stage, minimizing management overhead. Replicating code across environments increases maintenance complexity, while migrating to ECS or Elastic Beanstalk introduces container or server management, defeating the purpose of a serverless architecture. This makes stage variables and aliases the most efficient solution with the least development effort.