Configuring Auto Scaling group creation policies
In the previous section, you configured a user data script and CloudFormation Init metadata so that your ECS container instances can perform first time initialization and configuration appropriate to the given target environment. Although each instance will signal CloudFormation of success or failure of the CloudFormation Init process, you need to configure CloudFormation explicitlyto wait for each instance in the Auto Scaling group to signal success, which is important if you want to ensure you don't attempt to try and deploy ECS services to your ECS clusters before they have registered with the ECS cluster or if they fail for some reason.
Â
CloudFormation includes a feature referred to as creation policies, which allow you to specify optional creation success criteria when creating EC2 Auto Scaling groups and EC2 instances. When a creation policy is attached to an EC2 Auto Scaling group, CloudFormation will wait for a configurable number of...