AWS Certified Developer – Associate (DVA-C02)DeploymentEasy
A company is deploying a new version of their web application to an Auto Scaling group of EC2 instances using AWS CodeDeploy. They want to ensure that the new version is thoroughly tested before it fully replaces the old version, allowing for a gradual rollout and easy rollback if issues are detected. Which CodeDeploy deployment type best fits these requirements?
- AIn-place deployment
- BBlue/green deployment
- CRolling update deployment
- DAll-at-once deployment
Show answer & explanationAnswer & explanation
Correct answer: B. Blue/green deployment
Blue/green deployment is ideal for scenarios requiring extensive testing and easy rollback. It deploys the new version to a separate set of instances (green environment) while the old version (blue environment) remains active. Once verified, traffic is shifted, and the old environment can be terminated or kept for rollback.
Why the other options are wrong
- A. In-place updates instances directly, making rollback harder and causing downtime if not managed carefully.
- C. Rolling update gradually replaces instances but doesn't provide a fully separate, tested environment for the new version before traffic shift.
- D. All-at-once updates all instances simultaneously, leading to potential significant downtime and difficult rollbacks if issues arise.
CodeDeploy Blue/Green Deployment
A CodeDeploy strategy where a new version of an application is deployed to a completely separate environment (green) while the old version (blue) remains active. Traffic is then shifted to the new environment after validation.
- Minimizes downtime during deployment.
- Enables easy rollback to the previous version.
- Allows thorough testing of the new version in a production-like environment before traffic shift.
Memory trick: Blue/Green: New house (green) built next to old (blue), then move in.