A SysOps Administrator is using AWS CloudFormation to update a production application hosted on an Amazon EC2 Auto Scaling group behind an Application Load Balancer. The administrator is updating the launch template inside the CloudFormation template. The deployment must maintain full capacity at all times during the update to prevent performance degradation. Additionally, if the new instances fail application health checks during deployment, the stack must automatically roll back to its previous state.
Which two configurations should the administrator implement to meet these requirements? (Select two.)
- Configure the AutoScalingRollingUpdate policy's MinInstancesInService parameter to match the desired capacity of the Auto Scaling group.Answer
- Set up CloudFormation rollback triggers in the RollbackConfiguration parameter to monitor CloudWatch alarms associated with the Application Load Balancer target group's health.Answer
- CSet the MinInstancesInService parameter to in the AutoScalingRollingUpdate policy to speed up the update process and minimize temporary EC2 running costs.
- DMonitor the CloudFormation console and manually transition the stack state from UPDATE_IN_PROGRESS to UPDATE_ROLLBACK_FAILED if the health checks fail.
- ERely on the CloudFormation service role's default trust relationship to launch the instances, omitting the iam:PassRole permission from the IAM policy since the role has administrative access.
Answer
Configure the AutoScalingRollingUpdate policy's MinInstancesInService parameter to match the desired capacity of the Auto Scaling group, and set up CloudFormation rollback triggers in the RollbackConfiguration parameter to monitor CloudWatch alarms associated with the Application Load Balancer target group's health.
To maintain full capacity during a rolling update, the AutoScalingRollingUpdate policy's MinInstancesInService parameter must equal the desired capacity. This forces CloudFormation to launch new instances before terminating old ones. To automate rollback based on health checks, CloudFormation rollback triggers (RollbackConfiguration) must monitor CloudWatch alarms. If the alarms are triggered due to unhealthy instances, CloudFormation automatically rolls back the stack.
Step-by-Step Solution
Key Concept
Using CloudFormation AutoScalingRollingUpdate policies to preserve capacity combined with RollbackConfiguration to automate rollback on health check failure.
Estimated Time:2m 0s