Amazon EC2 Auto Scaling helps you maintain application availability and allows you to dynamically scale your Amazon EC2 capacity up or down automatically according to conditions you define. You can use Amazon EC2 Auto Scaling for fleet management of EC2 instances to help maintain the health and availability of your fleet and ensure that you are running your desired number of Amazon EC2 instances. You can also use Amazon EC2 Auto Scaling for dynamic scaling of EC2 instances in order to automatically increase the number of Amazon EC2 instances during demand spikes to maintain performance and decrease capacity during lulls to reduce costs. Amazon EC2 Auto Scaling is well suited both to applications that have stable demand patterns or that experience hourly, daily, or weekly variability in usage.
Edit asg.json update the values of %TargetGroupArn% from the previous steps.
Update the values of %publicSubnet1% and %publicSubnet2% from the CloudFormat stack outputs.
Save the file and create the auto scaling group:
aws autoscaling create-auto-scaling-group --cli-input-json file://asg.json
This command will not return any output if it is successful.
Browse to the Auto Scaling console and check out your newly created auto scaling group. Take a look at the instances it has deployed.