I'm looking for a way to temporarily disable an existing AWS auto-scaling group without deleting/recreating the group, or its triggers. "Disabling" meaning: prevent any instance creation or deletion for a short period of time without wiping the whole related configuration.
Our current release process creates and configure new EC2 instance and inject them in our ELB once ready. It also remove old instances and stop them. For a very short time, the ELB contains twice the usual amount of EC2 instances.
This amount may exceed MAX instance count in the ELB for a very short duration. During this process, we'd like to prevent the auto-scaling group from terminating random supernumerary instances.
I could not find any « disable » option in amazon console. It may not match auto-scaling group philosophy. Did I missed something ? Is there a tool for that through amazon command line tools or boto framework ?
In the autoscaling lingo, what you are asking about is suspending processes. In a nutshell each of the autoscaling activities (launch, terminate etc.) can be disabled for as long as you want.
It doesn't look you can set this from the web console (although it does display what processes are available), so you'll either have to use the api or the command line tools
From the cli that's just
aws autoscaling suspend-processes --auto-scaling-group-name MyGroup
and later on
aws autoscaling resume-processes --auto-scaling-group-name MyGroup
You can pass specific processes to suspend resume as extra arguments, but you probably don't need to do that.
Not the best way to do things, but works if you do not have CLI access at the moment.
to use the web console to remove all instances from an aws scaling group: Set max. instances, min. instances, and desired instances to 0;
You can make the MAX instance = 3 and MIN instance = 3 i.e. Specifying the same instance count for both min and max.
This way there shouldn't be any change in the instance count no matter what your rules are.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With