Monitoring Amazon SQS queues using CloudWatch - Amazon Simple Queue Service
Services or capabilities described in Amazon Web Services documentation might vary by Region. To see the differences applicable to the China Regions, see Getting Started with Amazon Web Services in China (PDF).

Monitoring Amazon SQS queues using CloudWatch

Amazon SQS and Amazon CloudWatch are integrated so you can use CloudWatch to view and analyze metrics for your Amazon SQS queues. You can view and analyze your queues' metrics from the Amazon SQS console, the CloudWatch console, using the Amazon CLI, or using the CloudWatch API. You can also set CloudWatch alarms for Amazon SQS metrics.

CloudWatch metrics for your Amazon SQS queues are automatically collected and pushed to CloudWatch at one-minute intervals. These metrics are gathered on all queues that meet the CloudWatch guidelines for being active. CloudWatch considers a queue to be active for up to six hours if it contains any messages, or if any action accesses it.

When an Amazon SQS queue is inactive for more than six hours, the Amazon SQS service is considered asleep and stops delivering metrics to the CloudWatch service. Missing data, or data representing zero, can't be visualized in the CloudWatch metrics for Amazon SQS for the time period that your Amazon SQS queue was inactive.

  • An Amazon SQS queue can be activated when the user calling an API against the queue is not authorized, and the request fails.

  • The Amazon SQS console performs a GetQueueAttributes API call when the queue’s page is opened. The GetQueueAttributes API request activates the queue.

  • A delay of up to 15 minutes occurs in CloudWatch metrics when a queue is activated from an inactive state.

  • There is no charge for the Amazon SQS metrics reported in CloudWatch. They're provided as part of the Amazon SQS service.

  • CloudWatch metrics are supported for both standard and FIFO queues.