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

# Amazon SNS for SMS

> Send SMS notifications with Courier and Amazon SNS (AWS SNS), including setup, phone number profile requirements, and credential overrides.

Amazon Simple Notification Service, also written as Amazon SNS or AWS SNS, delivers SMS messages to a recipient's phone number. Courier's provider key for it is `aws-sns`.

<Note>
  Amazon SNS also works as a push provider. See [Amazon SNS for push](/docs/external-integrations/push/aws-sns).
</Note>

## Setup

You will need an AWS account with credentials that can publish to SNS. In Courier, navigate to the [Amazon SNS integration](https://app.courier.com/integrations/catalog/aws-sns) page, enter your Access Key ID and Secret Access Key, choose your region, then click "Complete."

The same form has a Topic ARN field. That applies to push only, so you can leave it empty when using SNS for SMS. A `phone_number` on the profile outranks it either way, so a saved Topic ARN will not divert an SMS.

You only add the integration once. It is then available as a provider on both the SMS and push channels.

## Profile Requirements

To deliver a message to a recipient over AWS SNS, Courier must be provided the recipient's phone number in E.164 format. This value should be included in the recipient profile as `phone_number`.

```json theme={null}
{
  "message": {
    "to": {
      "phone_number": "+12345678901"
    }
  }
}
```

## Overrides

The `config` override swaps the Access Key ID, Secret Access Key, or region at send time. Region defaults to `us-east-1` when neither the override nor the integration sets one.

```json theme={null}
{
  "message": {
    "template": "NOTIFICATION_TEMPLATE_ID",
    "to": {
      "phone_number": "+12345678901"
    },
    "providers": {
      "aws-sns": {
        "override": {
          "config": {
            "accessKeyId": "RUNTIME_ACCESS_KEY_ID",
            "secretAccessKey": "RUNTIME_SECRET_ACCESS_KEY",
            "region": "eu-west-1"
          }
        }
      }
    }
  }
}
```

The `body` override merges into the SNS `Publish` request itself, so its fields use the AWS parameter names rather than Courier's. See the [SNS publish properties](https://docs.aws.amazon.com/AWSJavaScriptSDK/latest/AWS/SNS.html#publish-property).

```json theme={null}
{
  "message": {
    "template": "NOTIFICATION_TEMPLATE_ID",
    "to": {
      "phone_number": "+12345678901"
    },
    "providers": {
      "aws-sns": {
        "override": {
          "body": {
            "MessageAttributes": {
              "AWS.SNS.SMS.SMSType": {
                "DataType": "String",
                "StringValue": "Transactional"
              }
            }
          }
        }
      }
    }
  }
}
```
