0
votes

I have an alarm that I want to trigger based on lambda functions.

So the flow looks like this: DynamoDB table update -> triggers Lambda function (this part is working) -> Update CloudWatch alarm based on evaluation in Lambda function

The lambda function looks at the dynamo table and is able to determine, based on the content of the DynamoDB table, whether or not the specified alarm should be in alarm or not.

Right now I'm using a test alarm which is monitoring some random metric. The problem is, it keeps going out of alarm automatically. I don't have any specific metric I want to "watch".

Is there a way to do this with CloudWatch?

Thank you!

1
Are you sending the data to metrics frequently? If yes, what is the frequency in mins or seconds? - notionquest

1 Answers

1
votes

Instead of using the lambda function to transition the alarm into ALARM state, use it to publish a custom metric (publish value 1 if alarming state is detected and 0 otherwise for example) and create an alarm on that metric.