Defining an EC2 Auto Scaling launch configuration
Although you have defined an EC2 Auto Scaling group resource, you cannot yet deploy your CloudFormation template as the Auto Scaling group references a resource called ApplicationAutoscalingLaunchConfiguration, which is yet to be defined.
An EC2 Auto Scaling launch configuration defines the configuration that is applied to each instance at launch time, and provides a common approach to ensuring each instance in your Auto Scaling group is consistent.
The following example demonstrates configuring an Auto Scaling launch configuration within your CloudFormation template:
...
...
Parameters:
ApplicationDesiredCount:
Type: Number
Description: Desired EC2 instance count
ApplicationImageId:
Type: String
Description: ECS Amazon Machine Image (AMI) ID
ApplicationSubnets:
Type: List<AWS::EC2::Subnet::Id>
Description: Target subnets for EC2 instances
Resources:
ApplicationAutoscalingLaunchConfiguration:
Type: AWS...