I would like to prevent EC2 instance termination by Auto Scaling feature if that instance is in the middle of some sort of processing.
Suppose I have an Auto Scaling group that currently has 5 instances running. I create an alarm on average CPU usage... Suppose 4 of the instances are idle and one is doing some heavy processing... The average CPU load will trigger the alarm and as a result the scale-down policy will execute.
How do I get Auto Scaling to terminate one of the idle instances and not the one that is in the middle of the processing?