HiveBrain v1.2.0
Get Started
← Back to all entries
patternModerate

Is it possible to trigger an AWS Lambda function directly from CloudWatch alarm?

Submitted by: @import:stackexchange-devops··
0
Viewed 0 times
cloudwatchalarmtriggerfunctionpossibledirectlyawsfromlambda

Problem

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:

Solution

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.

Context

StackExchange DevOps Q#243, answer score: 10

Revisions (0)

No revisions yet.