AWS Certified Developer – Associate (DVA-C02)DeploymentMedium
A developer is deploying a serverless application using AWS Lambda and Amazon API Gateway. They need to ensure that different environments (development, staging, production) can have their own isolated Lambda function versions and API Gateway stages. Which deployment strategy best supports this requirement?
- ACanary deployment with weighted routing in API Gateway
- BBlue/Green deployment using AWS CodeDeploy
- CAll-at-once deployment with CloudFormation
- DUsing Lambda aliases and API Gateway stages
Show answer & explanationAnswer & explanation
Correct answer: D. Using Lambda aliases and API Gateway stages
Lambda aliases allow developers to point to specific Lambda function versions, and API Gateway stages provide distinct endpoints and configurations for different environments. This combination perfectly isolates environments for serverless applications.
Why the other options are wrong
- A. Canary deployments are for gradual rollout of traffic, not for isolating full environments.
- B. Blue/Green is for EC2/ECS and some Lambda, but Lambda aliases/API Gateway stages are more direct for isolated serverless environments.
- C. All-at-once deployment doesn't provide isolated environments; CloudFormation is a tool for provisioning, not a deployment strategy itself for isolation.
Lambda Aliases & API Gateway Stages
Lambda aliases allow you to manage multiple versions of your Lambda function, pointing to a specific version. API Gateway stages are named references to a deployment of your API, providing distinct URLs and configurations for different environments.
- Lambda aliases point to specific function versions.
- API Gateway stages create distinct API endpoints.
- Ideal for managing dev, test, and production environments.
- Enables independent testing and deployment for serverless apps.
Memory trick: Aliases and Stages: Your serverless's distinct pages.