A SysOps administrator is configuring AWS CodeDeploy to deploy updates to a web application running on an Auto Scaling group of Amazon EC2 instances behind an Application Load Balancer. The deployment process must maintain full application capacity during the deployment to avoid performance degradation, automatically revert to the previous version with the minimum possible recovery time if application-specific Amazon CloudWatch alarms are triggered, and ensure that active user sessions connected to the old version are not abruptly disconnected. Which configuration should the administrator select to meet these requirements?
- Configure a blue/green deployment with an automatic rollback configuration for CloudWatch alarms, and set a deregistration delay on the load balancer's target group.Answer
- BConfigure an in-place deployment with an automatic rollback configuration for CloudWatch alarms, and set a deregistration delay on the load balancer's target group.
- CConfigure a blue/green deployment with a manual rollback action, and configure connection draining on the Auto Scaling group lifecycle hooks.
- DConfigure an in-place deployment with a custom deployment configuration of CodeDeployDefault.AllAtOnce, and enable automatic rollback when a deployment fails.
Answer
Configure a blue/green deployment with an automatic rollback configuration for CloudWatch alarms, and set a deregistration delay on the load balancer's target group.
The correct configuration is a blue/green deployment combined with automatic rollback and load balancer deregistration delay. A blue/green deployment maintains full capacity by provisioning a new auto scaling group (the green environment) alongside the existing one (the blue environment). If a CloudWatch alarm triggers a rollback, CodeDeploy can instantly redirect traffic back to the original instances, resulting in the shortest recovery time. The deregistration delay (connection draining) ensures that existing sessions on the old instances are allowed to complete before the instances are terminated.
Step-by-Step Solution
Key Concept
AWS CodeDeploy deployment strategies (In-place vs Blue/Green), rollback behaviors, and Load Balancer integration settings.