11

Currently, for triggering a lambda function in response to a CloudWatch alarm, I need to route the alarm via SNS, like this:

AWS CloudWatch Alarm --> Send to a topic in SNS --> SNS topic triggers the lambda function

So, is there a way I can do it directly, without SNS in the middle? [Reason: Less touch points and a bit of cost optimization].

CloudWatch events trigger lambda but there is no way I can trigger alarms via it. The only options available in CloudWatch events for SQS are:

enter image description here

8

As far as I know, it is not possible. The the offcial AWS Lambda documentation says it support CloudWatch Events, but no mention of CloudWatch Alarms (and CW Events != CW Alarms)

What you are currently doing, sending the alarms on a SNS and using listening on a topic seems the way to go. In fact, CloudWatch Alarms only outputs to SNS so far.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.