Amazon SNS

5 minutes 5 Questions

Amazon Simple Notification Service (SNS) is a fully managed pub/sub messaging service that enables you to decouple microservices, distributed systems, and serverless applications. As a Solutions Architect, understanding SNS is crucial for designing scalable, event-driven architectures on AWS. SNS operates on a publish-subscribe model where publishers send messages to topics, and subscribers receive those messages through supported protocols. Key protocols include HTTP/HTTPS endpoints, email, SMS, AWS Lambda functions, Amazon SQS queues, and mobile push notifications. When designing new solutions, SNS provides several architectural benefits. First, it offers fan-out patterns where a single message can be delivered to multiple subscribers simultaneously, enabling parallel processing across different services. Second, it supports message filtering, allowing subscribers to receive only relevant messages based on attribute-based policies, reducing unnecessary processing. For high availability, SNS stores messages across multiple Availability Zones, ensuring durability and reliability. It integrates seamlessly with other AWS services like CloudWatch for monitoring, IAM for access control, and KMS for message encryption at rest. Key design considerations include setting appropriate retry policies for HTTP endpoints, implementing dead-letter queues for failed message deliveries, and using FIFO topics when message ordering is critical. SNS FIFO topics integrate with SQS FIFO queues for strict ordering and exactly-once processing. Cost optimization strategies involve batching messages when possible and carefully selecting subscriber protocols based on use case requirements. SNS pricing is based on the number of requests, notifications delivered, and data transfer. For enterprise architectures, SNS supports cross-account access through topic policies and can trigger workflows across AWS accounts and regions. This makes it ideal for building event-driven architectures, application alerts, workflow automation, and mobile notification systems in modern cloud solutions.

Amazon SNS - AWS Solutions Architect Professional Guide

Why Amazon SNS is Important

Amazon Simple Notification Service (SNS) is a fundamental building block for designing scalable, decoupled architectures in AWS. As a Solutions Architect Professional, understanding SNS is critical because it enables event-driven architectures, facilitates communication between distributed systems, and supports multiple delivery protocols. SNS appears frequently in exam scenarios involving microservices, serverless architectures, and high-availability designs.

What is Amazon SNS?

Amazon SNS is a fully managed pub/sub (publish/subscribe) messaging service that enables you to decouple microservices, distributed systems, and serverless applications. It follows a push-based delivery model where messages are pushed to subscribers as soon as they are published to a topic.

Key Components:
- Topics: Logical access points and communication channels
- Publishers: Applications that send messages to topics
- Subscribers: Endpoints that receive messages from topics
- Messages: Data payloads up to 256 KB in size

How Amazon SNS Works

1. Create a Topic: Set up an SNS topic as a central communication channel

2. Configure Subscriptions: Subscribe endpoints to the topic using supported protocols:
- HTTP/HTTPS endpoints
- Email/Email-JSON
- Amazon SQS queues
- AWS Lambda functions
- SMS text messages
- Platform application endpoints (mobile push)
- Amazon Kinesis Data Firehose

3. Publish Messages: Publishers send messages to the topic

4. Fan-out Delivery: SNS delivers the message to all subscribed endpoints simultaneously

Key Features for the Exam

Message Filtering:
Subscription filter policies allow subscribers to receive only a subset of messages. This reduces processing overhead and costs by filtering at the SNS level rather than at the subscriber level.

FIFO Topics:
SNS FIFO topics provide strict message ordering and exactly-once message delivery. They work exclusively with SQS FIFO queues as subscribers.

Message Durability:
SNS stores messages across multiple Availability Zones for high durability.

Dead-Letter Queues:
Configure DLQs to capture messages that cannot be delivered to subscribers after retries.

Server-Side Encryption:
SNS supports encryption at rest using AWS KMS keys.

Access Control:
Use IAM policies and SNS access policies to control who can publish to topics and manage subscriptions.

Common Architecture Patterns

1. Fan-out Pattern: One SNS topic with multiple SQS queue subscribers enables parallel processing of the same message by different services

2. Application Integration: SNS triggers Lambda functions for serverless event processing

3. Cross-Region Replication: SNS can publish to SQS queues in different regions for disaster recovery

4. Mobile Push Notifications: SNS integrates with APNS, FCM, and other mobile platforms

Exam Tips: Answering Questions on Amazon SNS

Tip 1: Recognize Fan-out Scenarios
When a question describes a need to send the same message to multiple recipients or services for parallel processing, SNS with multiple SQS subscribers is typically the answer.

Tip 2: SNS vs SQS
SNS is push-based and supports multiple subscribers; SQS is pull-based and messages go to a single consumer. Questions asking about one-to-many communication point toward SNS.

Tip 3: FIFO Requirements
If ordering and exactly-once delivery are mentioned, consider SNS FIFO topics paired with SQS FIFO queues.

Tip 4: Message Size Limits
Remember the 256 KB message size limit. For larger payloads, the pattern involves storing data in S3 and sending a reference through SNS.

Tip 5: Cross-Account Access
SNS topic policies enable cross-account publishing and subscribing. Look for this in multi-account architecture questions.

Tip 6: Filter Policies
When questions mention reducing unnecessary processing or filtering messages for specific subscribers, message filtering is the solution.

Tip 7: Mobile and SMS
For questions about sending notifications to mobile devices or SMS messages at scale, SNS is the appropriate service.

Tip 8: Event-Driven Architecture
In serverless scenarios, SNS often works with Lambda, EventBridge, and SQS to create loosely coupled, event-driven systems.
Test mode:
More Amazon SNS questions
43 questions (total)

Other Design for New Solutions concepts

Adopting managed servicesAmazon CloudWatchAmazon ElastiCache replicationAmazon GuardDutyAmazon RDS replicationAmazon S3 replicationAmazon SQSApplication and infrastructure availabilityApplication failover mechanismsApplication upgrade paths for new servicesAttack mitigation strategiesAutomated backup solutionsAuto scaling policies and eventsAWS CloudFormationAWS CodeBuildAWS CodeDeployAWS CodePipelineAWS cost and usage monitoringAWS managed service cost benefitsAWS Secrets ManagerAWS service endpointsAWS ShieldAWS Step FunctionsAWS storage optionsAWS storage services and replicationAWS Systems ManagerAWS WAFBackup and restore DR strategyBlue/green deploymentsBuffering and queuing patternsCaching strategies for performanceCanary deploymentsCentralized monitoring for recoveryChange management processesCI/CD pipelines on AWSCompliance with organizational standardsConfiguration management toolsConfiguring DR solutionsCredential management servicesCross-Region backup strategiesDatabase failover mechanismsDatabase replication configurationData replication strategiesData transfer cost optimizationData transfer modelingDDoS protection strategiesDelegating complex tasks to AWSDeployment strategies with rollback mechanismsDesigning for failureDisaster recovery scenariosDR testing proceduresEC2 instance families and use casesElastic architecture designEncryption options for data at restEncryption options for data in transitExpenditure and usage awarenessHighly available application designInfrastructure as Code (IaC)Infrastructure rightsizing for costLarge-scale application architecture designLoosely coupled dependenciesMulti-AZ architecturesMulti-AZ backup architecturesMulti-Region architecturesNetwork ACL rules designPatch management strategiesPerformance monitoring technologiesPricing models comparisonPrinciple of least privilege accessPurpose-built databasesPurpose-built service selectionRead replicas for performanceRightsizing strategiesRolling deploymentsRoute 53 failover routingRoute 53 geolocation routingRoute 53 health checksRoute 53 latency-based routingRoute 53 routing methodsSecurity group rules designService endpoint securityService quotas and limitsStorage tiering strategies