📖 What is Simple Notification Service (SNS)?
SNS is a fully managed pub/sub messaging service enabling event-driven architectures. It allows applications to publish messages to topics, which are then distributed to subscribed endpoints, including SQS queues, Lambda functions, and email addresses, facilitating real-time communication.
"Focus on the publish/subscribe model. SNS is often paired with SQS for reliable message delivery. Understand the difference between SNS topics and SQS queues, and how they interact. Be aware of SNS message filtering capabilities."
📚 Certification: AWS Certified Solutions Architect - Associate (SAA-C03)
🔑 What are the Key Concepts of Simple Notification Service (SNS)?
- ▸ SNS utilizes a publish/subscribe model, decoupling message producers from consumers for scalability and resilience.
- ▸ Topics in SNS act as access points for sending messages, and subscribers receive messages filtered by attributes.
- ▸ SNS supports multiple subscription protocols, including SQS, Lambda, HTTP/S, email, and SMS for broad integration.
- ▸ Message filtering allows subscribers to only receive messages with specific attributes, reducing unnecessary processing.
- ▸ SNS can be integrated with IAM policies to control access to topics and subscriptions, ensuring security.
🎯 How does Simple Notification Service (SNS) appear on the SAA-C03 Exam?
You may be asked to identify the best service for broadcasting a single event to multiple downstream systems, such as triggering Lambda functions and sending email notifications.
A scenario might describe a system needing to fan-out messages to multiple SQS queues based on message attributes – determine how SNS message filtering can achieve this.
Expect questions about choosing between SNS and SQS; understand when to use SNS for one-to-many distribution versus SQS for reliable queuing.
❓ Frequently Asked Questions
When would I use SNS message filtering instead of filtering within the subscriber (e.g., Lambda)?
SNS filtering reduces the cost and complexity of processing unwanted messages at the subscriber level. It's more efficient for high-volume scenarios where many messages are irrelevant to a specific subscriber.
Can SNS guarantee message delivery to all subscribers?
SNS offers 'at least once' delivery. Subscribers might receive duplicate messages in rare cases. For guaranteed, exactly-once delivery, combine SNS with SQS and utilize its deduplication features.
How does SNS interact with SQS to improve reliability?
SNS can publish messages to SQS queues. SQS provides durable storage and ensures messages are delivered even if subscribers are temporarily unavailable, enhancing overall system reliability.