Add basic support for cloudwatch alarms

This also includes some refactoring to more easily handle different event types.