Time between AWS Notifying of Scale Down and Terminating instance

Posted by SteveEdson on Server Fault See other posts from Server Fault or by SteveEdson
Published on 2012-12-07T17:24:05Z Indexed on 2012/12/07 23:11 UTC
Read the original article Hit count: 318

Here is the scenario, there are multiple EC2 instances behind a load balancer. When traffic dies down, the SCALE_DOWN policy is triggered from a CloudWatch alarm. What I would like, is for the instance that is going to be terminated, or a separate server altogether, to be able to run a quick script that will execute a few commands to ensure all data has been transferred.

My initial question was going to be how can I send a notification when an instance is going to be terminated by an auto scale, SCALE_DOWN policy. But then I saw this question Amazon EC2 notifying the instance when the autoscale service terminates it.

If the notification is sent, how much time is there before the instance actually gets terminated? Are there any parameters to specify this time?

Would it be a better idea to notify an instance that it is no longer needed, and get the instance to terminate itself once it has finished running the final script?

Or, am I making this into a bigger problem than it actually is, and theres a far simpler solution?

© Server Fault or respective owner

Related posts about amazon-ec2

Related posts about amazon-web-services