Skip to content

Instantly share code, notes, and snippets.

@benbpyle
Created February 19, 2023 16:31
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 benbpyle/398cd6fca1ce00682ad5af1fe47880e0 to your computer and use it in GitHub Desktop.
Save benbpyle/398cd6fca1ce00682ad5af1fe47880e0 to your computer and use it in GitHub Desktop.
AWS SNS CLI Commands
# List topics
aws sns list-topics
# Create topic
aws sns create-topic --name test-topic
# Subscribe
aws sns subscribe --topic-arn arn:aws:sns:us-west-2:123456789012:the-topic --protocol sqs --notification-endpoint http://some-queu-url
# List subscriptions
aws sns list-subscriptions
# Post a message to a Topic
aws sns publish --topic-arn arn:aws:sns:us-west-2:123456789012:topic --message "{\"event\":{\"type\":\"TeamUpdate\",\"id\":1,\"name\":\"New Team Name\"}}"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment