📖 What is Amazon Simple Notification Service (SNS)?
Amazon Simple Notification Service (SNS) is a fully managed pub/sub messaging service that enables application-to-application and application-to-person communication. It allows you to send messages to a large number of subscribers across multiple endpoints, including SMS, email, and HTTP, ensuring highly available and durable message delivery.
"Student, remember that SNS is 'push' while SQS is 'pull'. If you see a requirement for 'fan-out' architecture, SNS is almost always the correct answer."
📚 Certification: AWS Certified Solutions Architect - Associate (SAA-C03)
🔑 What are the Key Concepts of Amazon Simple Notification Service (SNS)?
- ▸ The Pub/Sub model decouples publishers from subscribers, allowing messages to be sent to a topic without knowing the specific recipients.
- ▸ Fan-out architecture enables a single SNS message to be replicated and pushed to multiple SQS queues or Lambda functions simultaneously.
- ▸ Message Filtering allows subscribers to define policies based on attributes, ensuring they only receive messages that meet specific criteria.
- ▸ SNS supports diverse delivery endpoints, including SQS for asynchronous processing, Lambda for serverless execution, and SMS or Email for human alerts.
- ▸ SNS FIFO topics ensure strict message ordering and eliminate duplicate deliveries, which is essential for applications requiring precise sequence processing.
🎯 How does Amazon Simple Notification Service (SNS) appear on the SAA-C03 Exam?
You may be asked to design a system where a single event, such as a new order, must trigger multiple independent downstream processes like invoicing and shipping.
A scenario might describe a need for real-time administrative alerts when a CloudWatch alarm is triggered, requiring an SNS topic for email or SMS notifications.
Expect questions about improving system reliability by placing SQS queues as subscribers to an SNS topic to prevent message loss during downstream service outages.
❓ Frequently Asked Questions
What is the fundamental difference between SNS and SQS in a decoupled architecture?
SNS is a push service that delivers messages immediately to all active subscribers. SQS is a pull service where consumers poll the queue for messages at their own pace.
How can I prevent every subscriber from receiving every message sent to a topic?
Use SNS Message Filtering. By adding attributes to the message, you can create filter policies for subscribers so they only receive data relevant to them.
When should I choose SNS FIFO over Standard SNS topics?
Choose FIFO when the order of messages is critical and you must avoid duplicate deliveries, though be aware it has lower throughput than Standard topics.