> ## Documentation Index
> Fetch the complete documentation index at: https://docs.incident.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Adding AWS SNS as an alert source

> Turn messages on an AWS SNS topic into alerts that page the right people and open incidents.

AWS SNS delivers messages from many AWS services, and from your own code, to the subscribers of
a topic. Subscribe incident.io to a topic and every message becomes an incident.io alert, so you
can route it to a team, escalate to whoever is on call, and open an incident when one matters.

| | |
| - | - |
| **Plans** | All plans |
| **Connects with** | An alert source. incident.io subscribes to your SNS topic over HTTPS |
| **What you get** | [Alerts](https://docs.incident.io/alerts/getting-started.md) and [alert attributes](https://docs.incident.io/alerts/attributes-and-priorities.md) to route, escalate and declare incidents from |

> [!NOTE]
>
> If you only send CloudWatch alarms, use the AWS CloudWatch alert source instead. It's built for
> CloudWatch alarms.

## Step 1: create the alert source

1. Go to [Alerts](https://app.incident.io/~/on-call/alert-routes/sources) in your incident.io dashboard
   and select the **Sources** tab.
2. Press **Create source**, search for **AWS SNS**, and continue.
3. Give it a name.

The setup page shows an **Endpoint** to paste into AWS, and a **Deduplication key** setting.
Keep it open for the next step.

## Step 2: connect AWS SNS

In the AWS console, open **SNS**:

1. Choose **Topics** and create a **Standard** topic with the default settings.
2. Select the topic and click **Create subscription**.
3. Set **Protocol** to HTTPS, paste the **Endpoint** from incident.io, and leave **Raw message
   delivery** unchecked.
4. Save the subscription. incident.io confirms it automatically, so its status should change to
   **Confirmed**.

If you send alerts from AWS Managed Grafana, set the contact point format to **JSON**.

Refer to [AWS's SNS documentation](https://docs.aws.amazon.com/sns/latest/dg/sns-create-subscribe-endpoint-to-topic.html)
for details of their console.

## How alerts behave

* **Title and description.** The alert title is the message's **Subject**, the description is
  the message body, and the alert links to the topic in the AWS console. Grafana messages use
  the Grafana alert's name and description instead.
* **Deduplication.** The **Deduplication key** setting decides which messages share an alert.
  **Automatic**, the default for new sources, gives one alert per CloudWatch alarm, Inspector or
  GuardDuty finding, or AWS Health event. Older sources use **Each message** until you change it.
  See [How are AWS SNS messages deduplicated?](https://docs.incident.io/alerts/sns-dedup.md) for every option.
* **Resolution.** A CloudWatch `OK`, a closed Inspector finding, a closed AWS Health event or a
  Grafana `resolved` message resolves its alert. With **Each message**, only Grafana alerts
  resolve on their own.
* **Security.** incident.io rejects any request that SNS didn't sign.
* **Attributes.** A JSON message body is under `MessageJSON` (such as `MessageJSON.team`),
  publisher attributes are under `MessageAttributes`, and query parameters you add to the
  endpoint URL are under `query_params`. Use these to set
  [alert attributes](https://docs.incident.io/alerts/attributes-and-priorities.md), for example to map a topic to a team.

## Step 3: check it works

Publish a message to the topic from the AWS console. The alert should appear on the alert source
page in incident.io within a few seconds.

If nothing arrives, check **Recent requests** on that page. Every request SNS sent is listed
there, including any that were rejected, with the reason.

***

Can't find the alert source you are looking for? Head to our
[integrations page](https://incident.io/integrations) or message us at
[support@incident.io](mailto:support@incident.io).
