Monitor SQS queues with CloudWatch metrics and alarms

Michael Wittig – 17 Jan 2019 (updated 17 Aug 2021)

Many applications depend on an Amazon SQS message queue to exchange information. The message producers are decoupled from the message consumers. However, the producers rely on a consumer to eventually process the message. That’s why you need to add monitoring to be alerted if the message processing is not working or if messages are not processed fast enough. Learn how to monitor SQS in the following.

CloudWatch metrics

Each SQS queue sends metrics to CloudWatch that we can monitor with CloudWatch alarms. We recommend creating alarms for the following metrics:

  • ApproximateAgeOfOldestMessage: The approximate age in seconds of the oldest non-deleted message in the queue.
  • ApproximateNumberOfMessagesVisible: The number of messages available for retrieval from the queue.

Set up instructions

Monitoring Setup Assistant
Monitor SQS and receive alerts in Slack or Microsoft Teams!

  1. Add marbot to Slack or Microsoft Teams.
  2. Invite marbot to a channel.
  3. In the channel, type:
    @marbot Monitor SQS
  4. Hit enter and follow the wizard.
Michael Wittig

Michael Wittig

Consultant focusing on Amazon Web Services (AWS). Entrepreneur building marbot.io. Author of Amazon Web Services in Action, Rapid Docker on AWS, and cloudonaut.io.

You can contact me via Email, Twitter, and LinkedIn.

Published on and updated on

marbot teaser

Chatbot for AWS Monitoring

Configure monitoring for Amazon Web Services: CloudWatch, EC2, RDS, EB, Lambda, and more. Receive and manage alerts via Slack. Solve incidents as a team.

Slack
Add to Slack
Microsoft Teams
Add to Teams