← Back to Services

SNS

Priority Tier 4 Domain 2: Design Resilient Architectures

Amazon Simple Notification Service (SNS) is a fully managed messaging service that enables both application-to-application (A2A) and application-to-person (A2P) communication, primarily through a push-based messaging model and fanout architectures (Source: 2, 6, 8). It allows you to decouple and scale microservices, distributed systems, and serverless applications.

Learning Objectives

Core Concepts

Amazon SNS provides scalable, flexible, and cost-effective messaging capabilities.

Amazon SNS is a fully managed messaging service for both application-to-application (A2A) and application-to-person (A2P) communication. It enables fanout architectures. As a push-based messaging service, a producer sends a message to a topic, and messages are then pushed to consumers.
SNS facilitates fanout architectures by distributing messages to multiple consumers. This pattern decouples producers and consumers, scales automatically, and allows multiple consumers to process messages independently at their own pace.
Standard SNS topics do not guarantee message ordering. However, SNS can leverage FIFO topics for strict ordering and deduplication of messages. This is a key differentiator when message order is critical.

Use Cases

SNS is designed for a variety of messaging and notification scenarios.

For applications ingesting messages with drastic and sudden spikes (e.g., up to 100,000/sec), SNS can publish messages to a topic with multiple Amazon SQS subscriptions. Consumer applications then process messages from their respective queues, enabling decoupling and increased scalability for dozens of consuming applications/microservices.
Technical Specs: Up to 100,000 messages/sec ingestion spikes
SNS is used for alerting, especially in scenarios involving Amazon CloudWatch alarms messaging teams or email systems. It can send emails, texts, or any other push-based notifications.
SNS can act as a destination for Amazon S3 Event Notifications, triggering actions in real-time when specific events (e.g., object creation, removal) occur in an S3 bucket. It can also be used with AWS CloudTrail to send notifications when logs are delivered.

Integrations and Subscriber Options

SNS supports integration with various AWS services and endpoints for message delivery.

Amazon SQS

SNS topics can fan out messages to Amazon SQS queues, allowing multiple consumers to process messages asynchronously at their own pace.
Use Cases:
  • Decoupling microservices
  • Buffering messages for asynchronous processing

AWS Lambda

Lambda functions can subscribe to SNS topics to run custom code in response to messages, enabling event-driven processing. However, standard SNS does not guarantee message ordering when triggering Lambda.
Use Cases:
  • Real-time data processing
  • Automated actions based on events

Email & SMS

SNS can send push-based notifications directly to email addresses and mobile phone numbers (SMS).
Use Cases:
  • Alerts
  • User notifications

Amazon Kinesis Data Firehose

Kinesis Data Firehose can be a subscriber option for SNS, allowing messages to be reliably delivered to data stores and analytics tools.
Use Cases:
  • Loading streaming data to S3, Redshift, OpenSearch

SQS Dead-Letter Queues (DLQ)

For messages that fail to be delivered or processed by SNS subscribers, an SQS Dead-Letter Queue (DLQ) can be configured to capture these failed messages. This helps in troubleshooting and prevents message loss.
Use Cases:
  • Saving failed messages for debugging
  • Ensuring message durability

Access Control

Access to SNS topics is managed through policies to ensure secure communication.

Access to SNS topics, including permissions for publishing messages to a topic and subscribing to a topic, is controlled by SNS Topic Access Policies.

Exam Tips

Glossary

Fanout architecture
A messaging pattern where a message published to a single topic is delivered to multiple subscribers simultaneously.
Push-based messaging
A communication model where messages are actively sent (pushed) from a producer to a consumer, rather than the consumer actively requesting (pulling) messages.
FIFO Topic
A type of Amazon SNS topic that provides strict message ordering and deduplication, ensuring messages are processed exactly once and in the order they were sent.
Dead-Letter Queue (DLQ)
An Amazon SQS queue that other queues or topics (like SNS) can use to isolate messages that could not be processed successfully, aiding in debugging and error handling.

Key Takeaways

Content Sources

08_AWS_Solutions_Architect_Associate_... AWS SAA-C03 Exam-Style Practice Quest... 01_AWS_Solutions_Architect_Associate_... AWS S3 Storage Classes: A Comprehensi... AWS S3 Storage Classes: A Comprehensi... Extracted: 2026-01-26 09:04:53.627141 Model: gemini-2.5-flash