AWS Simple Notification Service (SNS)
Amazon Simple Notification Service (SNS) is a highly available, durable, secure, fully managed pub or sub messaging service that enables you to distribute systems and serverless applications.

AWS SNS is a fast, flexible, highly available, durable, secure, fully managed push notification service. It provides a low-cost infrastructure for the mass delivery of messages.
Some Points about SNS:
- It is a web service that coordinates and manages the delivery or sending of messages to the subscriber endpoints or clients
- It allows for sending individual messages or Fan-out messages to a large number of recipients or to other AWS services
- Messages published to an SNS topic will be delivered to the subscriber immediately
- At least three copies of the data are stored across multiple availability zones in the same region
- Pay as you go model with no upfront cost
Example: Suppose when you are using auto-scaling in EC2, it triggers an SNS service using CloudWatch Alarms which will email/SMS that your EC2 instances are upscaling, downscaling or any other event is taking place. It is a way of notifying users about any event.
How It Works
Publishers: Publishers are also known as producers that produce and send the messages to SNS which is a logical access point.
Subscribers: Subscribers such as AWS Lambda, AmazonSQS, Web Servers receives the message or notification from the SNS over one of the supported protocol (SQS, Lamda, HTTP/HTTPS).
SNS Topic:
- It is a logical access point and communication channel
- Each topic name must be unique within the AWS account
- Topic name is limited to 256 alphanumeric characters
- Each topic is assigned an AWS ARN once it's created
- A topic can support subscribers and notification delivers over multiple protocols
- Delivery format such as Email, SMS, HTTP/HTTPS, AWS lambda, SQS, Email-JSON (for application)
Use Case:
While using SNS you can create a topic and control it by assigning access policies that decide which publishers and subscribers can communicate with the topic.
Instead of including a specific destination address in each message, publishers send messages to topics that they have created or they have permission to publish.
Amazon SNS matches the topic to a list of subscribers who have subscribed to that topic and deliver the message to each of the subscribers.
It can be used in workflow systems to relay events among distributed applications, move data between data stores, or update records in business systems.
AWS SNS provides significant advantages to developers who build applications that rely on real-time events.