Sending SNS messages from ubuntu
From Cramsession
✍️ Verified Author: Mflavell • Click to view professional profile & credentials
Tech Notes > AWS > Sending SNS messages from ubuntu
Create an SNS topic
- Longin to the AWS console
- Open SNS (Simple Notification Service)
- Create a standard topic
- Enter a name
- Click "create topic"
- Copy down the ARN for the topic
- Subscribe your email to the topic for testing.
Install the tools
try the test script
here's a simple test script:
SNS_ARN="arn:aws:sns:your_ARN_goes_here"
SUBJECT="$1"
MESSAGE="$2"
sns_publish(){
response=$(
aws sns publish \
--topic-arn "$SNS_ARN" \
--subject "$1" \
--message "$2"
)
echo $response
}