AWS CloudWatch alarm for Lambda Invocation

Viewed 402

I want to monitor a Lambda function based on the “invocation” metric. Specifically, I want the alarm to trigger if it hasn’t been invoked at least once. I've set up the following alarm and it hasn't triggered in 24 hours. I've made sure that Lambda has also not triggered however this alarm never goes into "ALARM" state. Any advice would be helpful.

Threshold: Invocations < 1 for 1 datapoints within 5 minutes
Statistic: Sum
Period: 5 minutes
Metric Name: Invocations
Namespace: AWS/Lambda
Datapoints to alarm: 1 out of 1
1 Answers

The Invocations metric is only written if there are invocations (i.e. it won't write a value of 0).

Therefore, for use cases such as this, where you want the alarm to trigger when the metric has not been written, you need to configure it to treat missing data as breaching.

Documentation for this is here.

Related