AWS › Amazon SNS (Simple Notification Service)

What is Amazon SNS and how does the publish subscribe messaging pattern work?

Beginner

Answer

Amazon SNS is a fully managed pub or sub messaging service that lets a publisher send a single message to a topic, which then automatically delivers that message to every subscriber currently attached to that topic, such as email addresses, SMS numbers, SQS queues, or Lambda functions, allowing you to fan out a single event to many different destinations without the publisher needing to know anything about who is subscribed.
aws sns publish --topic-arn arn:aws:sns:us-east-1:123456789012:OrderAlerts --message 'New order received'
Real-world example An online retailer publishes a single message to an SNS topic whenever a high value order is placed, and that one message is automatically delivered to the sales team's email, a Slack integration through Lambda, and a logging Lambda function all at once.

Common follow-ups: What is the difference between SNS and SQS?;How many subscribers can a single SNS topic support?