0

I want create a CloudWatch Alarm that triggers every time a message is sent to an SQS Dead Letter Queue and then clears 5 minutes later, unless one or messages are sent in the interim in which case the alarm should remain

I think the easiest approach is to check the metric ApproximateNumberOfMessagesVisible every five minutes. If the value has increased over the last five minutes the alarm is set.

The problem is I don't understand how to use cloudwatch's math metric function to determine this value in the previous five minute interval.

Any advice would be most welcome....

1 Answers1

-1

You can create a cloudwatch alarm on the NumberOfMessagesSent metric from SQS:

https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-available-cloudwatch-metrics.html

and then set a 5 minute period for that alarm