AWS Simple Notification Service (SNS)
| Schemes | sns:// |
| Cargo feature | service-sns |
| Service | https://aws.amazon.com/sns/ |
| Body formats | text (first is the default) |
| Attachments | no |
| Title length | no title (merged into the body) |
| Body length | 160 characters |
| Body lines | unlimited |
| Request throttle | 2500 ms between requests |
| Vendor URLs accepted | no |
URL formats
{schema}://{token}@{access_key_id}/{secret_access_key}/{region}/{targets}
{schema}://{access_key_id}/{secret_access_key}/{region}/{targets}
{schema} is one of sns://.
URL tokens
| Token | Meaning | Type | Required | Default | Notes |
|---|---|---|---|---|---|
{access_key_id} | Access Key ID | string | yes | secret | |
{region} | Region | string | yes | must match ^[a-z]{2}-[a-z-]+?-[0-9]+$ | |
{secret_access_key} | Secret Access Key | string | yes | secret | |
{target_phone_no} | Target Phone No | string | no | must match ^[0-9\s)(+-]+$ | |
{target_topic} | Target Topic | string | no | prefix #; must match ^[A-Za-z0-9_-]+$ | |
{targets} | Targets | list | yes | any of target_phone_no, target_topic; separated by / | |
{token} | Session Token | string | no | secret |
Query parameters
| Parameter | Meaning | Type | Default | Notes |
|---|---|---|---|---|
access | Access Key ID | string | sets {access_key_id} | |
key | Access Key ID | string | sets {access_key_id} | |
mode | Mode | choice | sms (usually; depends on the URL) | one of sms, topic |
region | Region | string | sets {region} | |
secret | Secret Access Key | string | sets {secret_access_key} | |
to | Targets | list | sets {targets} | |
token | Session Token | string | sets {token} |
The common URL parameters (format, overflow, verify, redirect, cto, rto, retry, wait, store, tag, tz, user, password, port, optional, emojis) apply as well.
Examples
Accepted URLs (tokens are fake):
sns://T1JJ3T3L2/A1BRTD4JD/TIiajkdnlazkcevi7FQ/us-west-2/12223334444
sns://T1JJ3T3L2/A1BRTD4JD/TIiajkdnlazkcevi7FQ/us-east-1/MyTopic/12223334444
sns://SESSIONTOKEN@T1JJ3T3L2/A1BRTD4JD/TIiajkdnlazkcevi7FQ/us-east-1/12223334444
sns://T1JJ3T3L2/A1BRTD4JD/TIiajkdnlazkcevi7FQ/us-east-1/MyTopic/12223334444?mode=t
sns://T1JJ3T3L2/A1BRTD4JD/TIiajkdnlazkcevi7FQ/us-east-1/MyTopic?mode=sms
sns://OTHER@T1JJ3T3L2/A1BRTD4JD/TIiajkdnlazkcevi7FQ/us-east-1/12223334444?token=TOK%2Bx%3D
sns://?key=T1JJ3T3L2&secret=A1BRTD4JD/TIiajkdnlazkcevi7FQ®ion=US-WEST-2&to=12223334444
sns://?access=T1JJ3T3L2&secret=A1BRTD4JD/TIiajkdnlazkcevi7FQ®ion=us-west-2&to=12223334444
Rejected URLs:
sns://
sns://T1JJ3T3L2
sns://T1JJ3TD4JD/TIiajkdnlazk7FQ/
sns://T1JJ3T3L2/A1BRTD4JD/TIiajkdnlazkcevi7FQ/us-east-1/12223334444?region=useast
Send one from the command line:
mercurio -t 'Backup' -b 'Finished in 42s' 'sns://T1JJ3T3L2/A1BRTD4JD/TIiajkdnlazkcevi7FQ/us-west-2/12223334444'
Notes
AWS Simple Notification Service (sns://): SMS and topic messages through AWS SNS.
Requests are signed with AWS Signature Version 4 when they are sent.