https://github.com/creasty/aws-sns-push
Send SNS push notifications painlessly from terminal
https://github.com/creasty/aws-sns-push
aws-cli aws-cli-utilities aws-sns push-notifications
Last synced: 12 months ago
JSON representation
Send SNS push notifications painlessly from terminal
- Host: GitHub
- URL: https://github.com/creasty/aws-sns-push
- Owner: creasty
- License: mit
- Created: 2017-07-27T15:41:05.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2017-07-29T06:33:16.000Z (almost 9 years ago)
- Last Synced: 2025-06-11T07:53:57.028Z (12 months ago)
- Topics: aws-cli, aws-cli-utilities, aws-sns, push-notifications
- Language: Go
- Homepage:
- Size: 17.6 KB
- Stars: 3
- Watchers: 1
- Forks: 0
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
aws-sns-push
============
[](https://travis-ci.org/creasty/aws-sns-push)
[](https://godoc.org/github.com/creasty/aws-sns-push)
[](https://github.com/creasty/aws-sns-push/releases)
[](./LICENSE)
Send SNS push notifications painlessly.
Installation
------------
```sh
$ brew install creasty/tools/aws-sns-push
```
Usage
-----
```sh-session
$ aws-sns-push
Send SNS push notifications painlessly.
USAGE:
aws-sns-push [OPTIONS] TARGET
TARGET:
1. {application-name}/{user-id}
e.g., sample-prod/12345
2. {application-name}/{device-token}
e.g., sample-prod/ffffff
3. {endpoint-arn}
e.g., arn:aws:sns:ap-northeast-1:0000:endpoint/APNS/sample-prod/ffffff
OPTIONS:
-y Send without confirmation
-v Show version
-h Show help
```
### Send
```sh-session
$ aws-sns-push sample-prod/12345
==> Endpoints
- arn:aws:sns:ap-northeast-1:000000000000:endpoint/APNS/sample-prod/ffffffff-ffff-ffff-ffff-ffffffffffff
==> Enter JSON message (Ctrl-D)
{
"APNS": "{\"aps\":{\"alert\":{\"title\":\"Hello from aws-sns-push\",\"body\":\"This is awesome\"}}}"
}
> Proceed to send [y] y
```
### Advanced usage with `jq`
```sh-session
$ cat | jq '{ APNS: (. | tojson) }' | aws-sns-push -y sample-prod/12345
{
"aps": {
"alert": {
"title": "Hello from aws-sns-push",
"body": "This is awesome"
}
}
}
^D
```