In modern cloud architecture, applications are decoupled into smaller, independent building blocks that are easier to develop, deploy and maintain. Publish/Subscribe (Pub/Sub) messaging provides instant event notifications for these distributed applications.

The Publish Subscribe model enables event-driven architectures and asynchronous parallel processing, while improving performance, reliability and scalability. For more information on Pub/Sub messaging on AWS, see Amazon Simple Notification Service.

What is Pub/Sub Messaging?

Get started with Amazon Simple Notification Service (SNS)

Try Amazon SNS for Free

AWS Free Tier includes 1 million mobile push notifications, 1 million email deliveries and more with Amazon SNS.

View AWS Free Tier Details »

Pub/Sub messaging provides significant advantages to developers who build applications that rely on real-time events. Message topics allow instantaneous, push-based delivery, eliminating the need for message consumers to periodically check or “poll” for new information and updates. This promotes faster response time and reduces the delivery latency that can be particularly problematic in systems where delays cannot be tolerated.

Pub/Sub makes discovery of services easier, more natural and less error prone. Instead of maintaining a roster of peers that an application can send messages to, a publisher will simply post messages to a topic. Then, any interested party will subscribe its endpoint to the topic, and start receiving these messages. Subscribers can change, upgrade, multiply or disappear and the system dynamically adjusts.

Pub/Sub makes software more flexible. Publishers and subscribers are decoupled and work independently from each other, which allows you to develop and scale them independently. You can decide to handle orders one way this month, then a different way next month. Adding or changing functionality won’t send ripple effects across the system, because Pub/Sub allows you to flex how everything uses everything else.

Communications and integration code is some of the hardest code to write. The Publish Subscribe model reduces complexity by removing all the point-to-point connections with a single connection to a message topic, which will manage subscriptions to decide what messages should be delivered to which endpoints. Fewer callbacks results in looser coupling and code that’s easier to maintain and extend.

Events published to a message topic can trigger multiple workers to perform necessary but unrelated tasks at the same time.

Instantly deliver critical updates and asynchronous event notifications to affected application components and end-users.

Relay events among applications, move data between data stores, refresh distributed caches, or update records in business systems.

Batch up tasks for bulk processing, or break up a larger task into lots of smaller ones and divide the work among multiple workers using message queuing.

Record events to analyse later, capture logs for operations and security, or archive to meet backup or compliance requirements.

Replicate data between production and development environments, or enable development and testing using live data.

Fanout asynchronous event notifications to distributed functions and message queues, in order to coordinate the components of your serverless application.

Pub/Sub messaging is a very powerful way for IoT devices to interact – devices can easily stream data to backend systems or to each other.

Get started for free with just three simple commands.