> ## Documentation Index
> Fetch the complete documentation index at: https://ampersand-24eb5c1a-rajatspawar-eng-4130-snowflake-key-note.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Amazon SQS destinations

For more information on destinations, see the [Destinations](/destinations) page.

When new data is read from a SaaS instance via a [Read Action](/read-actions) or [Subscribe Action](/subscribe-actions), Ampersand publishes the payload as messages to your Amazon SQS queue.

## Prerequisites

Before setting up an SQS destination, ensure that you have:

* An AWS account with an SQS queue
* AWS credentials with `sqs:SendMessage` permission on that queue

## Data format

Ampersand publishes each read or subscribe message to your queue as JSON. The full payload schema is defined in [webhook.yaml](https://github.com/amp-labs/openapi/blob/main/webhook/webhook.yaml).

## Create an SQS destination

Go to the [Destinations page](https://dashboard.withampersand.com/projects/_/destinations) in the Ampersand Dashboard and create a new SQS destination.

You'll need to provide:

| Field                     | Type   | Required | Example                                                     | Description                                      |
| ------------------------- | ------ | -------- | ----------------------------------------------------------- | ------------------------------------------------ |
| **Destination name**      | string | Yes      | `ampersandSQS`                                              | Alias to reference in your `amp.yaml` file       |
| **Queue URL**             | string | Yes      | `https://sqs.us-east-1.amazonaws.com/123456789012/my-queue` | URL of your SQS queue                            |
| **Region**                | string | Yes      | `us-west-2`                                                 | AWS region where your queue is located           |
| **AWS Access Key ID**     | string | Yes      | `AKIAIOSFODNN7EXAMPLE`                                      | AWS access key with `sqs:SendMessage` permission |
| **AWS Secret Access Key** | string | Yes      |                                                             | AWS secret access key                            |
| **Endpoint URL**          | string | No       | `https://sqs.us-east-1.amazonaws.com`                       | Custom SQS endpoint if applicable                |

## Refer to the destination in your integration

After creating your SQS destination, reference it in your `amp.yaml` file:

```yaml theme={null}
specVersion: 1.0.0
integrations:
  - name: salesforceToSQS
    displayName: Salesforce to SQS
    provider: salesforce
    read:
      objects:
        - objectName: account
          destination: ampersandSQS
        - objectName: contact
          destination: ampersandSQS
```
