can an EC2 instance decline an autoscale termination?

Is there a way for an EC2 instance in an autoscaling group to decline a scale-down termination request? I'm in a situation with highly dynamic load...and I don't want to terminate an instance that's in the first part of its charging hour. Even with the autoscale policy losestToNextInstanceHour I see cases where an instance is terminated that has 40 minutes left on its hour...and within that 40 minutes the load increases again.

So, I want my instances to be able to "thanks for asking me to terminate but I decline". Is this possible?


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


Yes, you can. You can select an instance in Autoscaling group and choose Protect From Scale in. It can be easily done via AWS Console. Go to ASG then instances then select the instances you want to protect then from actions just above the select box choose the option.

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

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

链接地址: http://www.djcxy.com/p/63390.html

上一篇: 终止Amazon中的自动缩放组的EC2实例

下一篇: EC2实例是否会拒绝自动缩放?