Alarm conditions and shutting things down on #AWS

How do I set up an alarm that automatically Stops all VMs and locks down my cloud account and sends my team an email? I have in mind three possible scenarios, in the manner of an IF-statement:

  • Our hourly burn exceeds $500

OR

  • My cumulative spend exceeds my grant value pro-rated by date w/r/t the period of the grant

OR

  • A single VM is costing more than $4 per hour

I’d like the auto-shutdown to be in place so I can debug the issue rather than have the money continue to burn over say a weekend.