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

# Amazon SNS destinations

> Fan out Read Actions and Subscribe Actions events from Ampersand to an Amazon SNS topic using AWS access keys with Publish permission on the topic.

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 SNS topic.

## Prerequisites

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

* An AWS account with an SNS topic
* AWS credentials with `sns:Publish` permission on that topic

## Data format

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

## Create an SNS destination

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

You'll need to provide:

| Field                     | Type   | Required | Example                                       | Description                                  |
| ------------------------- | ------ | -------- | --------------------------------------------- | -------------------------------------------- |
| **Destination name**      | string | Yes      | `ampersandSNS`                                | Alias to reference in your `amp.yaml` file   |
| **Topic ARN**             | string | Yes      | `arn:aws:sns:us-east-1:123456789012:my-topic` | ARN of your SNS topic                        |
| **Region**                | string | Yes      | `us-west-2`                                   | AWS region where your topic is located       |
| **AWS Access Key ID**     | string | Yes      | `AKIAIOSFODNN7EXAMPLE`                        | AWS access key with `sns:Publish` permission |
| **AWS Secret Access Key** | string | Yes      |                                               | AWS secret access key                        |
| **Endpoint URL**          | string | No       | `https://sns.us-east-1.amazonaws.com`         | Custom SNS endpoint if applicable            |

## Refer to the destination in your integration

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

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