AWS: Introduction to Simple Notification Service (Amazon SNS)
In modern cloud architecture, applications are decoupled into smaller, independent building blocks that are easier to develop, deploy and maintain. A Publish/Subscribe (Pub/Sub) messaging provider makes it easy to build highly functional and architecturally complex applications.
Publish/Subscribe (Pub/Sub): Pub/Sub is a messaging pattern where senders of messages, called publishers, do not program the messages to be sent directly to specific receivers, called subscribers, but instead keep them in intermediary message broker/channels without knowledge of which subscribers will use them. Similarly, subscribers only subscribe to messages that are of interest, without knowledge of which publishers.
AWS SNS is a fully managed pub/sub-messaging service. Amazon SNS offers several benefits for building and integrating loosely coupled distributed applications:
- Push-based delivery (no polling)
- Simple APIs and easy integration with applications
- Flexible message delivery over multiple transport protocols
- Inexpensive, pay-as-you-go model with no up-front costs
- Web-based AWS Management Console offers the simplicity of a point-and-click interface
The three main components of SNS are
- SNS Topics
- Subscribers
- Publishers
SNS Topics are named groups of events or access points, each identifying a specific subject, content, or event type. Each topic has a unique identifier (URI) that identifies the SNS endpoint for publishing and subscribing.
Subscribers are clients (applications, end-users, servers, or other devices) that want to receive notifications on specific topics of interest to them.
Publishers send messages to topics. SNS matches the topic with the list of subscribers interested in the topic and delivers the message to each and every one of them.
To start using AWS SNS follow the official guide by AWS — https://docs.aws.amazon.com/sns/latest/dg/welcome.html
Amazon SNS has pay-as-you-go pricing and no upfront costs. Users who sign up for AWS Free Tier receive 1 million mobile push notifications.