Skip to content

Instantly share code, notes, and snippets.

@nmagee
Created November 12, 2020 16:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nmagee/bab82ae246802728da231f817c36cb92 to your computer and use it in GitHub Desktop.
Save nmagee/bab82ae246802728da231f817c36cb92 to your computer and use it in GitHub Desktop.
A demo of publishing an SNS message. Update with the ARN of your own SNS Topic.
#!/usr/bin/env python3
import json
import boto3
import datetime
sns = boto3.client('sns')
response = sns.publish(
TopicArn="arn:aws:sns:us-east-1:555566667777:simple-topic",
Message="Hey there everybody, how's it going today?",
Subject="Testing testing"
)
print(response)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment