Temporarily disable AWS autoscale group actions

I am looking for a way to temporarily disable an existing AWS autoscale group without deleting / re-creating the group or its triggers. โ€œDisableโ€ value: Prevent the creation or deletion of an instance for a short period of time without clearing the entire associated configuration.

Our current release process creates and sets up a new instance of EC2 and injects them into our ELB once. It also deletes old instances and stops them. Within a very short time, the ELB contains twice the usual number of EC2 instances.

This amount may exceed the number of MAX instances in the ELB for a very short duration. During this process, we would like to prevent the auto-scaling group from terminating random unforeseen instances.

I could not find the โ€œdisconnectโ€ option in the amazon console. This may not be consistent with the philosophy of autoscaling. Did I miss something? Is there a tool for this with amazon command line tools or boto framework?

+6
source share
5 answers

In autoscaling lingo, you are asking for suspend processes . In a nutshell, each of the startup operations (start, end, etc.) can be disabled as long as you want.

It doesn't seem like you can install this from the web console (although it shows which processes are available), so you have to either use api or command line tools

From cli , which is just

aws autoscaling suspend-processes --auto-scaling-group-name MyGroup 

and then

 aws autoscaling resume-processes --auto-scaling-group-name MyGroup 

You can pass certain processes to pause the resume as additional arguments, but you probably don't need to.

+9
source

Not the best way to do something, but it works if at the moment you do not have access to the CLI.

to use the web console to remove all instances from the aws scaling group: Set max. copies, min. instances and desired instances up to 0;

+3
source

You can make an instance of MAX = 3 and MIN instance = 3 ie Specifying the same number of instances for min and max.

Thus, there should be no change in instance counting regardless of your rules.

+2
source

You can also remove the โ€œ Defaultโ€ option in the Termination policy and then stop your instance so that it does not pop up a new instamnce when you stop your instance and you can make the necessary changes to it

0
source

Set the desired Min and Max capacities to 0. Save. Check the activity history and you will see that the instances are terminated.

0
source

Source: https://habr.com/ru/post/1201654/


All Articles