Menu
Amazon Simple Queue Service
Developer Guide

Access CloudWatch Metrics for Amazon SQS

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 AWS CLI, or using the CloudWatch API. You can also set CloudWatch alarms for Amazon SQS metrics.

Amazon SQS Console

  1. Sign in to the Amazon SQS console.

  2. In the list of queues, choose (check) the boxes for the queues that you want to access metrics for. You can show metrics for up to 10 queues.

  3. Choose the Monitoring tab.

    Various graphs are displayed in the SQS metrics section.

  4. To understand what a particular graph represents, hover over next to the desired graph, or see Available CloudWatch Metrics for Amazon SQS.

  5. To change the time range for all of the graphs at the same time, for Time Range, choose the desired time range (for example, Last Hour).

  6. To view additional statistics for an individual graph, choose the graph.

  7. In the CloudWatch Monitoring Details dialog box, select a Statistic, (for example, Sum). For a list of supported statistics, see Available CloudWatch Metrics for Amazon SQS.

  8. To change the time range and time interval that an individual graph displays (for example, to show a time range of the last 24 hours instead of the last 5 minutes, or to show a time period of every hour instead of every 5 minutes), with the graph's dialog box still displayed, for Time Range, choose the desired time range (for example, Last 24 Hours). For Period, choose the desired time period within the specified time range (for example, 1 Hour). When you're finished looking at the graph, choose Close.

  9. (Optional) To work with additional CloudWatch features, on the Monitoring tab, choose View all CloudWatch metrics, and then follow the instructions in the Amazon CloudWatch Console procedure.

Amazon CloudWatch Console

  1. Sign in to the CloudWatch console.

  2. On the navigation panel, choose Metrics.

  3. Select the SQS metric namespace.

  4. Select the Queue Metrics metric dimension.

  5. You can now examine your Amazon SQS metrics:

    • To sort the metrics, use the column heading.

    • To graph a metric, select the check box next to the metric.

    • To filter by metric, choose the metric name and then choose Add to search.

For more information and additional options, see Graph Metrics and Using Amazon CloudWatch Dashboards in the Amazon CloudWatch User Guide.

AWS Command Line Interface

To access Amazon SQS metrics using the AWS CLI, run the get-metric-statistics command.

For more information, see Get Statistics for a Metric in the Amazon CloudWatch User Guide.

CloudWatch API

To access Amazon SQS metrics using the CloudWatch API, use the GetMetricStatistics API action.

For more information, see Get Statistics for a Metric in the Amazon CloudWatch User Guide.