Can an EC2 instance refuse autoscaling?

Is there a way for the EC2 instance in the autoscale group to reject the scaling completion request? I am in a situation with high dynamic load ... and I do not want to interrupt the instance, which is in the first part of its charging hour. Even with the autoscale losestToNextInstanceHour policy, I see cases where the instance ends, which has 40 minutes left for an hour ... and during these 40 minutes the load increases again.

So, I want my instances to be in the "thank you for asking me to stop, but I refuse." Is it possible?

+5
source share
2 answers

You can change instance protection to "Protect From In Scale" for instances that you want to reject. http://docs.aws.amazon.com/AutoScaling/latest/DeveloperGuide/AutoScalingBehavior.InstanceTermination.html#instance-protection

0
source

Yes, you can. You can select an instance in the Autoscaling group and select Protect From Scale. It can be easily done using the AWS Console. Then go to ASG, then select the instances you want to protect, and then the actions above the selection box, select an option.

You can also do this through: http://docs.aws.amazon.com/autoscaling/latest/userguide/as-instance-termination.html#instance-protection

You can edit the settings in ASG and change the settings according to the lifetime of the instance: http://docs.aws.amazon.com/autoscaling/latest/userguide/as-instance-termination.html#custom-termination-policy

0
source

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


All Articles