AWS Certified Solutions Architect: Amazon SNS

Mastering the Simple Notification Service for SAA-C03

1. Study Guide: Understanding Amazon SNS

Amazon Simple Notification Service (SNS) is a highly available, durable, secure, fully managed pub/sub messaging service. It enables you to decouple microservices, distributed systems, and serverless applications.

The Analogy: The Radio Station

Imagine a Radio Station (Publisher) broadcasting a signal. The station doesn’t know exactly who is listening; it just sends the data out on a specific Frequency (Topic). Anyone with a Radio (Subscriber) tuned to that frequency receives the message instantly. If 100 people tune in, 100 people get the news simultaneously. This is the essence of “Fan-out.”

Core Concepts & The Well-Architected Framework

  • Reliability: SNS stores messages across multiple geographically separated Availability Zones (AZs) to prevent data loss. By decoupling components, if a downstream service fails, the publisher remains unaffected.
  • Performance Efficiency: SNS handles the heavy lifting of message delivery to thousands of endpoints, allowing your application to scale without managing connection pools.
  • Operational Excellence: Managed service nature means no servers to patch or provision. Integration with CloudWatch allows for seamless monitoring of delivery success rates.

Comparison: SNS Standard vs. SNS FIFO

Feature SNS Standard SNS FIFO
Delivery Order Best-effort ordering First-In-First-Out (Strict)
Delivery Strategy At-least-once Exactly-once (Deduplication)
Throughput Nearly unlimited Up to 300 msg/sec (or 3000 with batching)
Common Use Case Fan-out to SQS, Lambda, Email Financial transactions, Inventory updates

Scenario-Based Learning (Decision Matrix)

If the requirement is…

  • To send an identical message to multiple SQS queues simultaneously: Use SNS Fan-out pattern.
  • To trigger a Lambda function immediately when an S3 upload occurs: Use S3 Event Notifications with SNS.
  • To ensure messages are processed by a single consumer in order: Use SQS FIFO (not just SNS).
  • To filter messages so subscribers only get what they need: Use SNS Filter Policies.

Exam Tips: Golden Nuggets

  • Pub/Sub vs. Pull: SNS is a “Push” mechanism. SQS is a “Pull” (polling) mechanism. The exam often tests the “Fan-out” pattern: SNS Topic -> Multiple SQS Queues.
  • Message Filtering: By default, a subscriber gets every message. Use Filter Policies (JSON) to avoid sending all messages to all subscribers, saving cost and compute.
  • Cross-Account Access: SNS supports resource-based policies (Access Policies) to allow publishers or subscribers from different AWS accounts.
  • Protocols: Remember the supported protocols: HTTP/S, Email, SMS, SQS, Lambda, and Mobile Push.

2. Infographic: The SNS Ecosystem

Publisher (EC2, S3, CloudWatch) SNS Topic SQS Queues Lambda Functions HTTP Endpoints

Key Services

Integrates natively with CloudWatch Alarms, Auto Scaling events, and AWS Budgets for instant alerting.

Common Pitfalls

Standard Topics do not guarantee order. If you need 100% strict ordering, you must use SNS FIFO topics.

Quick Patterns

Fan-out: Push a single message to SNS and have it land in multiple SQS queues for parallel processing by different microservices.

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top