---
title: Amazon SQS
description: >-
  Amazon Simple Queue Service (SQS) is a fast, reliable, scalable, fully managed
  message queuing service.
breadcrumbs: Docs > Integrations > Amazon SQS
---

# Amazon SQS
Integration version1.0.0


## Overview{% #overview %}

Amazon Simple Queue Service (SQS) is a fast, reliable, scalable, fully managed message queuing service.

Enable this integration to see all your SQS metrics in Datadog.

## Setup{% #setup %}

### Installation{% #installation %}

If you haven't already, set up the [Amazon Web Services integration first](https://docs.datadoghq.com/integrations/amazon_web_services.md).

### Metric collection{% #metric-collection %}

1. In the [AWS integration page](https://app.datadoghq.com/integrations/amazon-web-services), ensure that `SQS` is enabled under the `Metric Collection` tab.

1. Add these permissions to your [Datadog IAM policy](https://docs.datadoghq.com/integrations/amazon_web_services.md#installation) in order to collect Amazon SQS metrics:

   - `sqs:ListQueues`: Used to list alive queues.
   - `tag:GetResources`: Get custom tags applied to SQS queues.

For more information, see the [SQS policies](https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-authentication-and-access-control.html) on the AWS website.

1. Install the [Datadog - Amazon SQS integration](https://app.datadoghq.com/integrations/amazon-sqs).

### Log collection{% #log-collection %}

#### Enable SQS logging{% #enable-sqs-logging %}

See [Logging Amazon SQS API Calls Using AWS CloudTrail](https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/logging-using-cloudtrail.html) to configure your trail. When you define your trails, select a S3 bucket to write the logs in:



#### Send logs to Datadog{% #send-logs-to-datadog %}

1. If you haven't already, set up the [Datadog log collection AWS Lambda function](https://docs.datadoghq.com/logs/guide/send-aws-services-logs-with-the-datadog-lambda-function.md).
1. Once the lambda function is installed, manually add a trigger on the S3 bucket that contains your Amazon SQS logs in the AWS console. In your Lambda, click on S3 in the trigger list:  Configure your trigger by choosing the S3 bucket that contains your Amazon SQS logs and change the event type to `Object Created (All)` then click on the add button.

Once the trigger has been added, use the [Datadog Log Explorer](https://app.datadoghq.com/logs) to view your logs.

## Data Collected{% #data-collected %}

### Metrics{% #metrics %}

|  |
|  |
| **aws.sqs.approximate\_age\_of\_oldest\_message**(gauge)           | The approximate age of the oldest non-deleted message in the queue.*Shown as second*                                                                                                                                                    |
| **aws.sqs.approximate\_number\_of\_messages\_delayed**(gauge)      | The number of messages in the queue that are delayed and not available for reading immediately. This can happen when the queue is configured as a delay queue or when a message has been sent with a delay parameter.*Shown as message* |
| **aws.sqs.approximate\_number\_of\_messages\_not\_visible**(gauge) | The number of messages that are in flight. Messages are considered in flight if they have been sent to a client but have not yet been deleted or have not yet reached the end of their visibility window.*Shown as message*             |
| **aws.sqs.approximate\_number\_of\_messages\_visible**(gauge)      | The number of messages available for retrieval from the queue.*Shown as message*                                                                                                                                                        |
| **aws.sqs.number\_of\_deduplicated\_sent\_messages**(count)        | The number of sent messages that were deduplicated and not added to the queue.*Shown as message*                                                                                                                                        |
| **aws.sqs.number\_of\_empty\_receives**(count)                     | The number of ReceiveMessage API calls that did not return a message.*Shown as message*                                                                                                                                                 |
| **aws.sqs.number\_of\_messages\_deleted**(count)                   | The number of messages deleted from the queue.*Shown as message*                                                                                                                                                                        |
| **aws.sqs.number\_of\_messages\_received**(count)                  | The number of messages returned by calls to the ReceiveMessage API action.*Shown as message*                                                                                                                                            |
| **aws.sqs.number\_of\_messages\_sent**(count)                      | The number of messages added to a queue.*Shown as message*                                                                                                                                                                              |
| **aws.sqs.sent\_message\_size**(gauge)                             | The size of messages added to a queue.*Shown as byte*                                                                                                                                                                                   |

Each of the metrics retrieved from AWS are assigned the same tags that appear in the AWS console, including, but not limited to, host name, security-groups, and more.

### Events{% #events %}

The Amazon SQS integration does not include any events.

### Service Checks{% #service-checks %}

The Amazon SQS integration does not include any service checks.

## Out-of-the-box monitoring{% #out-of-the-box-monitoring %}

The Amazon SQS integration provides ready-to-use monitoring capabilities to monitor and optimize performance.

- Amazon SQS Dashboard: Gain a comprehensive overview of your SQS queues using the out-of-the-box [Amazon SQS dashboard](https://app.datadoghq.com/dash/integration/6/aws-sqs).
- Recommended Monitors: Enable [recommended Amazon SQS monitors](https://app.datadoghq.com/monitors/recommended) to proactively detect issues and receive timely alerts.

## Troubleshooting{% #troubleshooting %}

Need help? Contact [Datadog support](https://docs.datadoghq.com/help/).
