Take the 2-minute tour ×

When I go to EC2 console, I click one of:

  1. Shutdown
  2. Terminate
  3. Reboot
  4. Start

... I want to get a message on my "Director" machine, that the instance is e.g. booting, that it is shutting down, actually without need to poll all the statuses from the API.

The reason for this is, that I run my own Nagios monitoring with API, so I want director machine to receive / catch the event, and schedule the Down Time on Nagios.

Also, if it's "Terminate", the Director will update Chef server the way that it will remove the node.

Another reason for this is that polling the statuses very frequently is very limited to the API and I cant make continuous requests, but every 1-5 minutes. But this way, if I terminate the instance myself from the console, it takes too long for me to actually discover this information, and update other services accordingly.

Currently I am investigating that I could use the shutdown script on Linux instance, which would make remote API call to Director, and Director at the same time would be polling the statuses as well. However the best way would be to have a queue of the messages from EC2 directly without need to write additional APIs were there are reliable notifications about events on the instances.

I would really prefer to use AWS functionality to do it, except for Nagios.

share|improve this question

1 Answer 1

up vote 1 down vote accepted

You're going to need to handle this on your own. There's no way to add this type of hooks to AWS API actions.

Instead of using the AWS control panel, just perform all of these actions programmatically, via a scripting language of your choice. Then you can make sure to prep your environment however you need before calling the AWS API.

share|improve this answer
I see. Amazon made making this kind of system difficult. Because I cant make enough API calls as well cant get notifications about these events, so in a proper way I could use only Cloud Watch and not Nagios :-( I'll be pulling this information to a single machine anyway, and I hope it's going to work OK. –  Andrew Smith Sep 27 '12 at 13:20
@AndrewSmith No, they didn't make it difficult. Interacting with your infrastructure is not their responsibility. It's yours. Think about this from their perspective. If they did offer hooks from their API calls, just think about the innumerable customer systems, protocols, etc. they would be asked to support. –  EEAA Sep 27 '12 at 13:30
Well, in theory, for easy integration, I should be able to get events as well trigger them myself from the console. They would not have to send commands to multiple systems, but actually just a universal notification event in their own AWS format. –  Andrew Smith Sep 29 '12 at 13:36

Your Answer


