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....