AWS Certified DevOps Engineer – ProfessionalResilient Cloud SolutionsMedium

A large e-commerce platform relies on a critical microservice that processes customer orders. This microservice is deployed across multiple EC2 instances within an Auto Scaling group, behind an Application Load Balancer (ALB). The team needs to ensure that during deployments, new code is rolled out gradually, and any issues are detected and automatically rolled back without impacting active customer orders. Which deployment strategy and associated AWS services should be used to achieve this?

  1. ARolling update deployment using an Auto Scaling group's built-in instance refresh.
  2. BBlue/Green deployment using AWS CodeDeploy with Amazon EC2 Auto Scaling integration.
  3. CAll-at-once deployment using AWS CodeDeploy with a custom lifecycle hook.
  4. DIn-place deployment using AWS CodeDeploy with a Linear deployment configuration.
Show answer & explanation

Correct answer: B. Blue/Green deployment using AWS CodeDeploy with Amazon EC2 Auto Scaling integration.

Blue/Green deployment is ideal for critical applications as it creates an entirely new environment (green) for the new version, while the old environment (blue) remains active. Traffic is then shifted, and if issues arise, it can be quickly rolled back to the blue environment, ensuring zero downtime and minimal impact.

Why the other options are wrong

  • A. Rolling updates with Auto Scaling group instance refresh update instances in batches, but they don't provide the immediate rollback capability of a Blue/Green deployment, as the old environment is terminated as new instances replace it.
  • C. All-at-once deployment updates all instances simultaneously, leading to potential downtime and a high-impact failure if the new version has issues. This is unsuitable for critical services.
  • D. In-place deployment updates instances one by one or in batches, which can cause downtime or performance degradation during the update and makes rollback more complex.

Blue/Green Deployment

Blue/Green deployment is an application release strategy that reduces downtime and risk by running two identical production environments, 'Blue' (current version) and 'Green' (new version).

  • Zero downtime during deployment.
  • Instant rollback capability if issues arise.
  • New version is thoroughly tested in 'Green' before traffic shift.
  • Requires double the infrastructure for a short period.

Memory trick: Blue/Green for safe, swift, and sure updates.

More Resilient Cloud Solutions questions