Amazon Cloud - Auto Scaling

amazon-cloud

http://docs.aws.amazon.com/AutoScaling/latest/DeveloperGuide/WhatIsAutoScaling.html
http://docs.aws.amazon.com/autoscaling/latest/userguide/AutoScalingGroup.html
http://docs.aws.amazon.com/autoscaling/latest/userguide/GettingStartedTutorial.html

How can we verify an auto scaling group exists?

as-describe-auto-scaling-groups MyAutoScalingGroup —headers

How can we terminate an EC2 instance in our Auto Scaling Group?

In this section you will first remove the Amazon EC2 instance, then delete the Auto Scaling group, and finally delete the launch configuration. You must terminate all Amazon EC2 instances in an Auto Scaling group before you can delete the group. A simple way to terminate all instances in a group is to update the group so that both the minimum size and maximum size are set to zero. To remove the Amazon EC2 instance from the Auto Scaling group:

You'll use the as-update-auto-scaling-group command to update the Auto Scaling group that we created earlier.

as-update-auto-scaling-group MyAutoScalingGroup —min-size 0 —max-size 0

Now you'll use the as-describe-auto-scaling-groups command to verify that Auto Scaling has removed the instance from MyAutoScalingGroup. It can take a few minutes for the instance to terminate, so you might have to check the status more than once.

as-describe-auto-scaling-groups MyAutoScalingGroup —headers

How can we delete the Auto Scaling group?

as-delete-auto-scaling-group MyAutoScalingGroup

How can we delete the launch configuration?

as-delete-launch-config MyLC

Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License