cloudfriend icon indicating copy to clipboard operation
cloudfriend copied to clipboard

Add a shortcut for a CloudWatch alarm triggering a Lambda Function

Open mcwhittemore opened this issue 4 years ago • 3 comments

Getting a Lambda Function to be triggered by a CloudWatch Alarm requires one to create a SNS Topic and Lambda permission and wire them up correctly to the Alarm and Lambda function. These are boilerplate and feel like something we could shortcut so as to simplify the process of figuring this out. That said, I'm not sure what sort of barriers we want on the shortcuts we offer here. Any thoughts on if this makes the mark?

mcwhittemore avatar Jul 14 '20 19:07 mcwhittemore

I think this'd be meaningful. AWS doesn't have a direct alarm --> lambda pathway yet?

rclark avatar Jul 14 '20 21:07 rclark

Not that I have found and the example doc that hitting the top of google for me shows how to set this up via PowerShell which is pretty hard to parse. https://aws.amazon.com/blogs/developer/send-real-time-amazon-cloudwatch-alarm-notifications-to-amazon-chime/

mcwhittemore avatar Jul 15 '20 12:07 mcwhittemore

CloudWatch API reference docs confirm that you can only use certain services as alarm actions, and lambda isn't included. So yeah, you need to stick an SNS topic in between the alarm and the Lambda.

rclark avatar Jul 15 '20 16:07 rclark