Search code examples
amazon-web-servicesamazon-sqsamazon-cloudwatch

Monitor multiple SQS queues altogether or individually?


I'm working on a system that uses AWS SNS/SQS as its messaging platform, which has around 100 queues, each of them having its own DLQ.

e.g.:

  • queue-001 / queue-001_dlq.
  • queue-002 / queue-002_dlq.
  • [...]
  • queue-100 / queue-100_dlq.

I would like to receive a notification when any of the DLQs receives a message (ApproximateNumberOfMessagesVisible >= 1).

What is the recommended approach to monitor all these queues?

  • Is there a way of configuring a single alarm for all these queues?
  • Should I just create an alarm per queue?

Solution

  • An alternative approach would be to schedule a Lambda function that gathers the individual metrics and creates a combined custom metric with a single Alarm.

    This would probably be cheaper than the individual metrics since the Alarms are 10c/month. The Lambda cost would be minimal, and possibly within your Free Tier usage.