Application Integration
Amazon SNS
Managed publish/subscribe service: publishers send messages to a topic, and Amazon SNS delivers them to all of its subscribers, such as Amazon SQS queues, AWS Lambda functions, HTTP(S) endpoints, email, or SMS. It handles distributing the same message to many destinations (fan-out) and sending notifications.
Exam phrases that point here
«send the same message to multiple systems at once (fan-out)»
An SNS topic delivers a copy of every published message to all of its subscribers, so the producer publishes once and does not need to know each destination.
When not: If the consumers must process at their own pace or may be down, SNS alone is not enough: combine it with one Amazon SQS queue per consumer. If the distribution depends on rules over the content of events from many sources (including SaaS), Amazon EventBridge is usually a better fit.
«publish/subscribe (pub/sub) model with push delivery»
SNS pushes the message to subscribers as soon as it is published; nobody has to periodically check whether there are new messages.
When not: If the scenario requires a single consumer to pull messages when it can (polling) and the messages to wait until they are processed, that is a queue: Amazon SQS. If you want routing rules based on an event pattern, look at Amazon EventBridge.
«notify administrators by email or SMS»
A topic supports email and SMS subscriptions, and it is the usual target for operational alerts, for example when an alarm fires.
When not: SNS sends notifications, not templated email campaigns or mailbox management; for marketing or transactional email at scale, the scenario points to another service. Also, the alarm itself is detected by Amazon CloudWatch: SNS only delivers it.
«each subscriber must receive only the messages it cares about»
SNS lets you assign a filter policy to each subscription, so the subscriber receives only the messages whose attributes or body meet the conditions.
When not: If filtering is the heart of the problem, with many rules over events from AWS services or SaaS applications and many types of targets, Amazon EventBridge may be the best option. If there is only one consumer, a topic is not needed.
«broadcast messages in order and without duplicates to multiple subscribers»
SNS FIFO topics deliver messages in order and exactly once, and can feed the SQS FIFO queues of several systems.
When not: With a single consumer, an SQS FIFO queue is enough. If the data will be analyzed as a continuous stream, Amazon Kinesis Data Streams is usually a better fit. A standard topic guarantees neither ordering nor the absence of duplicates. And if the distribution is decided with per-subscriber filters, the new Custom Event Bus in Amazon EventBridge also delivers in order per event group and deduplicates on publish.
«send push notifications to mobile applications»
SNS Mobile Push delivers notifications to apps on mobile devices through push services such as APNs or FCM; they arrive as alerts, badges, or sounds.
When not: If the scenario is about syncing app data or authenticating mobile users, push notification is not the core requirement and the answer will be another service.
Often paired with
- Amazon SQS
- AWS Lambda