Skip to main content
Amazon Simple Notification Service, also written as Amazon SNS or AWS SNS, delivers push messages to devices subscribed to an SNS topic or target ARN. Courier’s provider key for it is aws-sns.
Amazon SNS also works as an SMS provider. See Amazon SNS for SMS.

Setup

You will need an AWS account with credentials that can publish to SNS. In Courier, navigate to the Amazon SNS integration page, enter your Access Key ID and Secret Access Key, choose your region, then click “Complete.” You only add the integration once. It is then available as a provider on both the push and SMS channels.
Leave the Topic ARN field empty if you want to push to individual devices. A Topic ARN saved on the integration takes precedence over the Target ARN in a recipient’s profile, so every push goes to that topic and the per-recipient value is ignored. See Destination precedence.

Profile Requirements

To deliver a message to a mobile device over SNS, Courier needs either the Target ARN that the device is subscribed to or a Topic ARN. To use a Target ARN, nest it under aws_sns in the recipient profile:
To use a Topic ARN, set it on the integration or pass it as a config override. It is not read from the recipient profile.

Destination precedence

Courier picks exactly one SNS destination per message, in this order:
  1. phone_number on the profile, which sends an SMS rather than a push
  2. Topic ARN, from the integration config or a config override
  3. aws_sns.target_arn on the profile
The first one present wins and the rest are discarded. Nothing is sent if none of the three is set.

Overrides

The config override swaps credentials, region, or the Topic ARN at send time:
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.