AWS Certified DevOps Engineer – ProfessionalSDLC AutomationEasy
A development team is deploying a new serverless application consisting of AWS Lambda functions and Amazon API Gateway. They need to ensure that the deployment process minimizes downtime and allows for a quick rollback in case of issues. Which deployment strategy should they implement?
- AAll-at-once deployment using AWS CloudFormation.
- BLinear deployment with AWS CodeDeploy for Lambda.
- CBlue/Green deployment using AWS CodeDeploy for Lambda.
- DIn-place deployment using AWS CodeDeploy.
Show answer & explanationAnswer & explanation
Correct answer: C. Blue/Green deployment using AWS CodeDeploy for Lambda.
Blue/Green deployment is ideal for serverless applications as it allows new versions of Lambda functions to be deployed alongside the old, with traffic gradually shifted. This minimizes downtime and provides an easy rollback mechanism.
Why the other options are wrong
- A. All-at-once deployment directly updates the Lambda functions, leading to potential downtime during the update and a more complex rollback process.
- B. Linear deployment is a type of canary deployment, which is a specific form of Blue/Green, but 'Blue/Green deployment' is the broader and more accurate term for the strategy described.
- D. In-place deployment is not suitable for serverless Lambda functions and does not provide zero-downtime or easy rollback.
Blue/Green Deployment (Lambda)
A deployment strategy where a new version of a Lambda function (green) is deployed alongside the existing version (blue), and traffic is gradually or instantly shifted to the new version, enabling zero-downtime and easy rollback.
- Minimizes downtime during deployments.
- Allows for quick and safe rollbacks.
- Traffic routing handled by CodeDeploy or Lambda aliases.
Memory trick: Serverless deployments are like traffic lights: Blue is current, Green is new, shift safely.