In this chapter, you created a solution for managing the life cycle of your ECS container instances and ensuring the applications and services running on your ECS clusters are not impacted any time you need to terminate and replace an ECS container instance within your ECS cluster.
You learned how to configure rolling updates for your EC2 Auto Scaling groups, by leveraging CloudFormation update policies that enable you to control how new instances can be added to your Auto Scaling groups in a rolling fashion. You saw that this feature works well at an Auto Scaling and EC2 instance level, however you found that the abrupt termination of existing ECS container instances in your cluster causes outages for your applications.
To address this challenge, you created an EC2 life cycle hook registered for EC2_INSTANCE_TERMINATING events and configured this hook to publish...