i've a strange problem which I don't understand. I have created an cloudwatch alarm which should notify me on errors within an lambda execution (including timeout).
The relevant parameters of the alarm are the following:
period = "300"
datapoints_to_alarm = "1"
evaluation_periods = "1"
treat_missing_data = "notBreaching"
statistic = "Sum"
threshold = "0"
metric_name = "Errors"
namespace = "AWS/Lambda"
alarm_actions = http:// aws_sns_topic.alarm.arn
When my lambda run's into a timeout after 15 min (max Lambda execution time), no email is sent to me. When my lambda run's into a timeout after 2, 6, 10 or 14 minutes i will get the notification email as expected. Even on 14 minutes and 30 seconds, the mail is sent. Over 14:30 minutes, the metric doesn't switch to alarm state.
Does anybody know why that is happen? The datapoint (error) is shown correctly in the metric. It seems that the point (error) is set to the start date of the lambda. Might that be the problem? Because already 3 evaluations periods elapsed since lambda start? But why I get the alarm mail when it runs on timeout after 14 minutes (also more than one evaluation period).
Already asked this question in AWS Forum but no answer yet.
Can anyone suggest what I'm doing wrong?
Regards Hannes