AWS Certified DevOps Engineer – ProfessionalSDLC AutomationEasy

A development team is deploying a new web application using AWS CodeDeploy. They want to minimize downtime during deployments and be able to quickly revert to the previous version if issues arise. The application runs on Amazon EC2 instances behind an Application Load Balancer (ALB). Which CodeDeploy deployment type and traffic routing configuration should the team choose?

  1. ABlue/Green deployment with traffic shifted using a canary strategy.
  2. BIn-place deployment with all traffic shifted immediately.
  3. CBlue/Green deployment with an all-at-once traffic shift.
  4. DIn-place deployment with a linear traffic shift.
Show answer & explanation

Correct answer: A. Blue/Green deployment with traffic shifted using a canary strategy.

Blue/Green deployments minimize downtime and provide an easy rollback mechanism by maintaining two distinct environments. A canary strategy for traffic shifting allows for gradual testing of the new version with a small percentage of users before a full cutover, mitigating risk.

Why the other options are wrong

  • B. In-place deployments cause downtime and make rollbacks harder. Immediate traffic shift is risky.
  • C. While Blue/Green is good, an all-at-once shift is less cautious than a canary strategy for new deployments.
  • D. In-place deployments cause downtime. Linear shifts are for in-place, not ideal for zero-downtime.

CodeDeploy Blue/Green Deployment with Canary

A deployment strategy that maintains two identical environments (Blue and Green) and gradually shifts traffic to the new Green environment, often using a canary release pattern to test the new version with a small subset of users.

  • Minimizes downtime during deployments.
  • Provides a quick and easy rollback mechanism.
  • Canary strategy reduces risk by slowly exposing new code to users.
  • Ideal for applications running on EC2, ECS, or Lambda.

Memory trick: Blue Green Canary: Two colors, one small bird, zero downtime.

More SDLC Automation questions