We have a business need to be notified when there are items in the AWS Dead Letter Queue. We are using SQS. However we don't want items to come out of the dead letter queue when we listen to them. How can this be accomplished?
Asked
Active
Viewed 701 times
0
-
1Couple of terminology recommendations: items in queues are 'messages', and messages are 'consumed'. Also related question [here](https://stackoverflow.com/questions/60211243/configure-sqs-dead-letter-queue-to-raise-a-cloud-watch-alarm-on-receiving-a-mess) and [here](https://stackoverflow.com/questions/58614653/aws-dead-letter-queue-cloudwatch-alarm-every-time-a-message-is-added). – jarmod Jan 07 '22 at 15:12
1 Answers
2
Create a CloudWatch Alarm on the Dead Letter Queue's ApproximateNumberOfMessagesVisible metric. Set the alarm condition to be when the value of that metric is greater than 0
.
This will cause the Alarm to trigger whenever the Dead Letter Queue has 1 or more messages in it.

Mark B
- 183,023
- 24
- 297
- 295