Skip to content

SNS

Simple Notification Service (Amazon SNS) is a fully managed publish/subscribe (pub/sub) messaging service that enables you to decouple and scale microservices, distributed systems, and serverless applications .

It provides a highly scalable, flexible, and cost-effective way to publish messages from an application and immediately deliver them to subscribers or other applications using a “push” mechanism that eliminates the need to periodically check or “poll” for new information .


Amazon SNS is a web service that makes it easy to set up, operate, and send notifications from the cloud . It follows the publish-subscribe (pub-sub) messaging paradigm, with notifications being delivered to clients using a push mechanism that eliminates the need to periodically check or “poll” for new information and updates .

BenefitDescription
Fully ManagedNo servers to provision, patch, or manage—AWS handles all ongoing operations and underlying infrastructure
Instantaneous Push DeliveryMessages are pushed immediately to subscribers—no polling required
Elastic ScalingTopics automatically scale to handle any number of publishers, subscribers, and messages without provisioning instructions
Multi-Protocol SupportDeliver messages to Lambda, SQS, HTTP/HTTPS, email, SMS, and mobile push
Cost-EffectivePay-as-you-go pricing with no upfront costs; free tier includes 1 million requests monthly
High AvailabilityMessages are stored redundantly across multiple Availability Zones
ResourceFree Monthly Amount
Publish requests1 million requests
HTTP/S deliveries100,000 deliveries
Email deliveries1,000 deliveries
SMS messages100 messages (to US numbers)

Amazon SNS is a versatile service that supports both application-to-application (A2A) and application-to-person (A2P) messaging patterns .

Application-to-Application (A2A) Use Cases

Section titled “Application-to-Application (A2A) Use Cases”
PatternDescriptionExample
Event Fan-OutOne event triggers multiple independent servicesNew user registration triggers welcome email, CRM update, and analytics
Decoupled MicroservicesServices communicate without direct dependenciesOrder service publishes to topic; inventory, billing, shipping subscribe independently
Event-Driven ArchitectureBuild responsive, scalable systemsS3 events trigger processing pipelines via SNS
PatternDescriptionExample
Mobile Push NotificationsSend notifications to iOS, Android, and other devicesBreaking news alerts, chat messages, promotional offers
SMS Text MessagesSend transactional text messages globallyOTP codes, delivery updates, appointment reminders
Email NotificationsSend operational alerts via emailCloudWatch alarm notifications, system alerts

Understanding these fundamental concepts is essential for working with Amazon SNS.

ComponentDescription
TopicAn access point that identifies a specific subject or event type for publishing messages
PublisherA component that sends messages to a topic
SubscriberA client interested in receiving notifications from topics of interest
SubscriptionA registration that associates a subscriber endpoint with a topic
MessageThe data sent from a publisher to subscribers (max 256 KB)
Publisher → SNS Topic → Subscriber A (Lambda)
→ Subscriber B (SQS)
→ Subscriber C (Email)
→ Subscriber D (SMS)
→ Subscriber E (HTTP)
StepDescription
1. Create TopicDeveloper creates a topic as an access point for a specific event type
2. Add SubscribersClients subscribe to the topic with endpoint protocols (SQS, Lambda, email, SMS, HTTP)
3. Set PoliciesTopic owner configures who can publish and subscribe, and which protocols are supported
4. PublishPublisher sends a message to the topic
5. Fan OutSNS replicates and pushes the message to all subscribers
6. DeliverEach subscriber receives the message over its configured channel

Amazon SNS offers two topic types, each designed for different messaging requirements .

FeatureStandard TopicFIFO Topic
Message OrderingBest-effort ordering (messages may arrive out of order)Strict first-in-first-out ordering
Message DeliveryAt-least-once deliveryExactly-once processing
DeduplicationNot supportedDuplicate messages aren’t delivered
ThroughputNearly unlimited TPSUp to 300 TPS (non-batch) or 3,000 TPS (batch)
Subscriber TypesAll types (Lambda, SQS, HTTP, email, SMS, mobile)Limited to SQS FIFO, Lambda, and HTTP/HTTPS
Use CasesHigh-throughput, order-tolerant workloadsOrder-critical, duplicate-sensitive workloads
ScenarioRecommended Topic Type
Media encoding, fraud detection, tax calculation, search indexingStandard
Critical alerting systems, loggingStandard
Bank transaction logging, stock monitoringFIFO
Flight tracking, inventory management, price updatesFIFO

FIFO Topic Requirements:

  • Topic name must end with .fifo
  • Subscribers must be FIFO-compatible (SQS FIFO queues, Lambda, HTTP/HTTPS)
  • Message deduplication IDs required or auto-generated

5. Step-by-Step: Creating Your First SNS Topic

Section titled “5. Step-by-Step: Creating Your First SNS Topic”
  • AWS account
  • AWS Management Console access
  1. Sign in to AWS Management Console
  2. Navigate to SNS (search in services bar)
  1. Click Create topic
  2. Select topic type:
    • Standard (default, higher throughput)
    • FIFO (strict ordering, exactly-once)
SettingDescriptionStandardFIFO
NameUnique identifiermy-topicmy-topic.fifo
Display nameOptional friendly nameOptionalOptional
Access policyWho can publish/subscribeOptionalOptional
EncryptionEnable server-side encryptionOptionalOptional
Delivery retry policyConfigure retry behaviorOptionalOptional

Click Create topic

Terminal window
# Create a standard topic
aws sns create-topic --name MyStandardTopic
# Create a FIFO topic
aws sns create-topic --name MyFifoTopic.fifo --attributes FifoTopic=true
# Subscribe an email endpoint
aws sns subscribe \
--topic-arn arn:aws:sns:us-east-1:123456789012:MyStandardTopic \
--protocol email \
--notification-endpoint user@example.com

An SNS message consists of:

ComponentDescriptionLimit
Message bodyThe actual content (string or JSON)256 KB
SubjectOptional subject line100 characters
Message attributesMetadata for filtering10 attributes
Message IDUnique identifier (auto-generated)-
Terminal window
# Publish a simple message
aws sns publish \
--topic-arn arn:aws:sns:us-east-1:123456789012:MyStandardTopic \
--message "Hello from AWS CLI!"
# Publish with subject
aws sns publish \
--topic-arn arn:aws:sns:us-east-1:123456789012:MyStandardTopic \
--message "Order #12345 has shipped" \
--subject "Order Update"
# Publish JSON message with attributes
aws sns publish \
--topic-arn arn:aws:sns:us-east-1:123456789012:MyStandardTopic \
--message '{"orderId": "12345", "status": "shipped"}' \
--message-attributes '{"eventType": {"DataType": "String", "StringValue": "OrderShipped"}}'
import boto3
import json
sns = boto3.client('sns', region_name='us-east-1')
# Simple message
response = sns.publish(
TopicArn='arn:aws:sns:us-east-1:123456789012:MyStandardTopic',
Message='Hello from Python!'
)
print(f"Message ID: {response['MessageId']}")
# Message with attributes (for filtering)
response = sns.publish(
TopicArn='arn:aws:sns:us-east-1:123456789012:MyStandardTopic',
Message=json.dumps({'orderId': '12345', 'status': 'shipped'}),
Subject='Order Update',
MessageAttributes={
'eventType': {
'DataType': 'String',
'StringValue': 'OrderShipped'
},
'priority': {
'DataType': 'Number',
'StringValue': '1'
}
}
)

You can publish from 1 to 10 messages per API request . Batching reduces costs because each message in a batch counts as a separate request, but you pay for only one API call.

# Batch publish
entries = [
{
'Id': '1',
'Message': 'Message 1'
},
{
'Id': '2',
'Message': 'Message 2'
}
]
response = sns.publish_batch(
TopicArn='arn:aws:sns:us-east-1:123456789012:MyStandardTopic',
PublishBatchRequestEntries=entries
)

SNS supports multiple subscriber endpoint types, enabling you to reach both applications and people .

ProtocolDescriptionUse Case
LambdaInvokes a Lambda function with the messageServerless event processing
SQSEnqueues message to a Standard or FIFO queueDurable, decoupled processing with retries
HTTP/HTTPSPOSTs message to a web endpointIntegrate with external systems, webhooks
Kinesis Data FirehoseDelivers to Firehose streams for S3, Redshift, etc.Message archiving and analytics
ProtocolDescriptionUse Case
Email / Email-JSONSends email to registered addressesAlerts, notifications, reports
SMSSends text messages to mobile phonesOTP codes, delivery updates
Mobile PushPush to iOS (APNs), Android (FCM), Amazon (ADM), Windows (WNS/MPNS)App notifications, alerts
Terminal window
# Subscribe an SQS queue
aws sns subscribe \
--topic-arn arn:aws:sns:us-east-1:123456789012:MyTopic \
--protocol sqs \
--notification-endpoint arn:aws:sqs:us-east-1:123456789012:MyQueue
# Subscribe a Lambda function
aws sns subscribe \
--topic-arn arn:aws:sns:us-east-1:123456789012:MyTopic \
--protocol lambda \
--notification-endpoint arn:aws:lambda:us-east-1:123456789012:function:MyFunction
# Subscribe an HTTP endpoint
aws sns subscribe \
--topic-arn arn:aws:sns:us-east-1:123456789012:MyTopic \
--protocol https \
--notification-endpoint https://my-api.example.com/webhook

For some protocols (email, HTTP/HTTPS), subscribers must confirm their subscription before receiving messages . SNS sends a confirmation message with a link to confirm.


Message filtering empowers subscribers to create a filter policy, so they only receive the notifications they are interested in, as opposed to receiving every single message posted to the topic .

SNS Topic → Filter Policy Evaluation → Subscriber receives only matching messages
{
"eventType": ["OrderShipped", "OrderDelivered"],
"priority": [{"numeric": [">=", 2]}],
"region": ["US", "EU"]
}

When publishing, include message attributes that subscribers can filter on :

response = sns.publish(
TopicArn=topic_arn,
Message=json.dumps({'orderId': '12345'}),
MessageAttributes={
'eventType': {
'DataType': 'String',
'StringValue': 'OrderShipped' # Used for filtering
},
'priority': {
'DataType': 'Number',
'StringValue': '2' # Used for filtering
}
}
)
OperatorDescriptionExample
Exact matchingString or numeric exact match"eventType": ["OrderShipped"]
Anything-butMatches anything except specified values"eventType": [{"anything-but": "Test"}]
Prefix matchingMatches strings starting with prefix"eventType": [{"prefix": "Order"}]
Numeric comparison>, >=, <, <=, =, ="priority": [{"numeric": [">=", 2]}]
ExistsChecks if attribute exists"eventType": [{"exists": true}]
BenefitDescription
Reduce Lambda invocationsOnly trigger functions for relevant messages
Lower costsFewer unnecessary message deliveries
Simplify subscriber logicSubscribers don’t need to filter messages themselves
Improve efficiencyEach subscriber processes only what they need

Message fan-out occurs when a message is sent to a topic and then replicated and pushed to multiple endpoints . Fan-out provides asynchronous event notifications, which in turn allow for parallel processing .

┌─────────────────┐
│ SNS Topic │
│ (Event Hub) │
└────────┬────────┘
┌────────────────────┼────────────────────┐
▼ ▼ ▼
┌───────────────┐ ┌───────────────┐ ┌───────────────┐
│ Subscriber A │ │ Subscriber B │ │ Subscriber C │
│ (Lambda) │ │ (SQS Queue) │ │ (HTTP) │
└───────────────┘ └───────────────┘ └───────────────┘
Process in Buffer for External
real-time async workers API call

Real-World Example: E-Commerce Order Processing

Section titled “Real-World Example: E-Commerce Order Processing”

When a customer places an order, a single “OrderPlaced” event can fan out to:

SubscriberAction
Inventory Service (SQS)Deduct stock levels
Billing Service (SQS)Process payment
Notification Service (Lambda)Send confirmation email
Analytics Service (Lambda)Track order metrics
Shipping Service (HTTP)Notify external fulfillment partner
BenefitDescription
Parallel processingMultiple services react simultaneously
Loose couplingPublisher doesn’t need to know about subscribers
Independent scalingEach subscriber scales based on its own load
Fault isolationOne subscriber’s failure doesn’t affect others

SNS and Lambda integration is one of the most popular serverless event-processing patterns .

  1. A Lambda function subscribes to an SNS topic
  2. When a message is published to the topic, SNS invokes the Lambda function
  3. Lambda receives the message payload and processes it
  4. No polling required—SNS pushes the message
Terminal window
aws sns subscribe \
--topic-arn arn:aws:sns:us-east-1:123456789012:MyTopic \
--protocol lambda \
--notification-endpoint arn:aws:lambda:us-east-1:123456789012:function:MyFunction
import json
def lambda_handler(event, context):
"""
Handles SNS messages.
SNS sends messages in a Records array.
"""
for record in event['Records']:
sns_message = record['Sns']
message_id = sns_message['MessageId']
subject = sns_message.get('Subject', 'No Subject')
message = json.loads(sns_message['Message']) # Parse JSON body
print(f"Processing message {message_id}")
print(f"Subject: {subject}")
print(f"Message data: {message}")
# Process the message (e.g., update database, send email)
return {'statusCode': 200, 'body': 'OK'}
{
"Records": [
{
"EventSource": "aws:sns",
"EventVersion": "1.0",
"EventSubscriptionArn": "arn:aws:sns:...",
"Sns": {
"Type": "Notification",
"MessageId": "12345678-1234-1234-1234-123456789012",
"TopicArn": "arn:aws:sns:us-east-1:123456789012:MyTopic",
"Subject": "Order Update",
"Message": "{\"orderId\": \"12345\", \"status\": \"shipped\"}",
"Timestamp": "2024-01-15T12:00:00.000Z",
"SignatureVersion": "1",
"Signature": "abcdef123456...",
"SigningCertUrl": "https://sns.us-east-1.amazonaws.com/...",
"UnsubscribeUrl": "https://sns.us-east-1.amazonaws.com/?Action=Unsubscribe...",
"MessageAttributes": {
"eventType": {
"Type": "String",
"Value": "OrderShipped"
}
}
}
}
]
}

11. SNS with Amazon SQS: The Fan-Out Pattern

Section titled “11. SNS with Amazon SQS: The Fan-Out Pattern”

A common pattern is to use SNS to publish messages to Amazon SQS queues to reliably send messages to one or many system components asynchronously .

ChallengeSolution with SNS + SQS
One message needs to trigger multiple servicesSNS fans out to multiple SQS queues
Subscriber might be temporarily unavailableSQS provides durable message storage
Each service needs independent retry logicEach SQS queue has its own visibility timeout and DLQ
Services process at different speedsEach queue allows independent scaling
┌─────────────────┐
│ SNS Topic │
│ (Order Events) │
└────────┬────────┘
┌────────────────────┼────────────────────┐
▼ ▼ ▼
┌───────────────┐ ┌───────────────┐ ┌───────────────┐
│ SQS Queue │ │ SQS Queue │ │ SQS Queue │
│ (Inventory) │ │ (Billing) │ │ (Shipping) │
└───────┬───────┘ └───────┬───────┘ └───────┬───────┘
▼ ▼ ▼
┌───────────────┐ ┌───────────────┐ ┌───────────────┐
│ Consumer │ │ Consumer │ │ Consumer │
│ (EC2/Lambda)│ │ (EC2/Lambda)│ │ (EC2/Lambda)│
└───────────────┘ └───────────────┘ └───────────────┘
Terminal window
# 1. Create SNS topic
aws sns create-topic --name OrderEvents
# 2. Create SQS queues
aws sqs create-queue --queue-name InventoryQueue
aws sqs create-queue --queue-name BillingQueue
aws sqs create-queue --queue-name ShippingQueue
# 3. Subscribe each queue to the SNS topic
aws sns subscribe --topic-arn arn:aws:sns:us-east-1:123456789012:OrderEvents \
--protocol sqs --notification-endpoint arn:aws:sqs:us-east-1:123456789012:InventoryQueue
aws sns subscribe --topic-arn arn:aws:sns:us-east-1:123456789012:OrderEvents \
--protocol sqs --notification-endpoint arn:aws:sqs:us-east-1:123456789012:BillingQueue
aws sns subscribe --topic-arn arn:aws:sns:us-east-1:123456789012:OrderEvents \
--protocol sqs --notification-endpoint arn:aws:sqs:us-east-1:123456789012:ShippingQueue
# 4. Add SQS policy to allow SNS to send messages
# (Required—SQS queues must grant SNS permission)

Amazon SNS mobile notifications can fan out mobile push notifications to iOS, Android, Fire OS, Windows, and Baidu-based devices .

PlatformServiceDevices
iOSApple Push Notification Service (APNs)iPhone, iPad, Apple Watch
AndroidFirebase Cloud Messaging (FCM)Android devices
AmazonAmazon Device Messaging (ADM)Fire OS devices
WindowsWindows Push Notification Services (WNS)Windows devices
Windows PhoneMicrosoft Push Notification Service (MPNS)Windows Phone
  1. Platform Application: Create a platform application in SNS for each push service (APNs, FCM)
  2. Device Registration: Mobile app registers device token with SNS
  3. Endpoint ARN: SNS creates an endpoint ARN for each device
  4. Publish: Send push notification to platform endpoint or topic
Terminal window
# Create platform application for FCM
aws sns create-platform-application \
--name MyAndroidApp \
--platform FCM \
--attributes PlatformCredential=YOUR_FCM_SERVER_KEY

Amazon SNS supports sending text messages (SMS messages) to one or multiple phone numbers in over 200 countries and regions .

Use CaseDescription
One-Time Passcodes (OTP)Login verification codes
Delivery UpdatesPackage tracking notifications
Appointment RemindersHealthcare, service appointments
System AlertsCritical operational notifications
Two-Factor Authentication (2FA)Secondary authentication factor
Terminal window
# Send SMS to a single number
aws sns publish \
--phone-number "+1234567890" \
--message "Your verification code is 456789"
# Send with message attributes (sender ID, max price)
aws sns publish \
--phone-number "+1234567890" \
--message "Your order has shipped!" \
--message-attributes '{
"AWS.SNS.SMS.SenderID": {"DataType": "String", "StringValue": "MyApp"},
"AWS.SNS.SMS.MaxPrice": {"DataType": "Number", "StringValue": "0.50"}
}'

Before moving to production, you can use the Amazon SNS sandbox to validate your SMS workloads . In the sandbox:

  • You can only send messages to verified phone numbers
  • You can request to move out of the sandbox (requires use case documentation)
DestinationApproximate Cost
United States$0.00645
India$0.0022
United Kingdom$0.0479
Canada$0.0075

Note: Prices vary by country and are subject to change. Always check the official AWS SNS pricing page for current rates.


Amazon SNS supports the delivery of notifications to email addresses subscribed to topics .

Use CaseDescription
Application alertsDevOps workflow visibility
CloudWatch alarm notificationsMetric threshold breaches
S3 event notificationsFile upload alerts
System reportsDaily/weekly summary reports
TypeDescription
EmailPlain text email with notification body
Email-JSONJSON-formatted email for programmatic processing
LimitationValue
Delivery rateCapped at 10 messages per second
RecommendationFor higher-volume email, use SNS + Lambda + Amazon SES

15. Message Delivery Retries and Dead-Letter Queues

Section titled “15. Message Delivery Retries and Dead-Letter Queues”

Amazon SNS uses several strategies that work together to provide message durability .

If a subscribed endpoint isn’t available, Amazon SNS executes a message delivery retry policy . The retry policy includes:

ParameterDefaultDescription
Initial delay1 secondWait before first retry
Maximum retries3Number of retry attempts
Backoff factor2.0Exponential backoff multiplier
Maximum delay20 secondsMaximum wait between retries

To preserve any messages that aren’t delivered before the delivery retry policy ends, you can create a dead-letter queue (SQS) .

Terminal window
# Configure DLQ for an SNS subscription
aws sns subscribe \
--topic-arn arn:aws:sns:us-east-1:123456789012:MyTopic \
--protocol sqs \
--notification-endpoint arn:aws:sqs:us-east-1:123456789012:MyQueue \
--attributes '{"RedrivePolicy": "{\"deadLetterTargetArn\":\"arn:aws:sqs:us-east-1:123456789012:MyDLQ\"}"}'

Amazon SNS provides encrypted topics to protect your messages from unauthorized and anonymous access .

FeatureDescription
Encryption algorithm256-bit AES-GCM
Key managementAWS KMS customer master keys (CMK)
Encryption scopeMessages are encrypted as soon as SNS receives them
DecryptionMessages are decrypted as they are delivered to endpoints
OptionDescription
AWS owned keyDefault, no additional cost
AWS managed keyaws/sns key in your account
Customer managed keyYour own KMS key with custom policies

Amazon SNS supports VPC Endpoints (VPCE) via AWS PrivateLink. You can use VPC Endpoints to privately publish messages to Amazon SNS topics from an Amazon Virtual Private Cloud (VPC), without traversing the public internet .

MethodDescription
IAM policiesControl which users/roles can perform SNS actions
Topic policiesResource-based policies for cross-account access
VPC endpointsPrivate access without internet traversal

SNS supports AWS CloudTrail, which records AWS API calls for your account and delivers log files to you . CloudTrail captures:

  • API caller identity
  • Time of API call
  • Source IP address
  • Request parameters
  • Response elements

MetricDescription
NumberOfMessagesPublishedMessages published to your topics
NumberOfNotificationsDeliveredMessages successfully delivered to subscribers
NumberOfNotificationsFailedMessages that failed delivery
PublishSizeSize of published messages
SMSMonthToDateSpentUSDSMS spending for current month
SMSSuccessRatePercentage of successful SMS deliveries

Enable delivery logging to capture:

  • Delivery attempts (successes and failures)
  • Message payloads
  • Endpoint responses

X-Ray can be enabled for SNS to trace messages as they flow through topics to downstream services.


ComponentPrice
Publish requests$0.50 per 1 million requests
HTTP/S deliveries$0.60 per 1 million deliveries
Email deliveries$2.00 per 100,000 deliveries
SMS deliveriesVaries by country ($0.0022 - $0.15)
Lambda & SQS deliveriesFree (billed by respective services)
Mobile push deliveries$0.50 per 1 million deliveries
ResourceFree Monthly Amount
Publish requests1 million
HTTP/S deliveries100,000
Email deliveries1,000
SMS (US numbers)100 messages
StrategyDescription
Use batchingPublish up to 10 messages per API call
Use message filteringReduce unnecessary deliveries to subscribers
Right-size topic typeFIFO topics cost more than Standard
Monitor SMS costsSMS pricing varies significantly by country
Use SQS for durabilitySQS deliveries are free at SNS level

LimitationValueImpact
Message size256 KB maximumFor larger payloads, use S3 + reference
Email delivery rate10 messages/secondNot suitable for high-volume email
No message persistenceMessages delivered and discardedUse DLQ or SQS for durability
FIFO throughput300 TPS (non-batch) / 3,000 TPS (batch)Lower than Standard
CategoryPractice
DesignMake message processing idempotent to handle potential duplicates
FilteringUse message attributes (not body) for filtering when possible
DurabilityConfigure dead-letter queues for critical subscriptions
CostUse batching to reduce API requests
SecurityEnable encryption for sensitive topics
MonitoringSet CloudWatch alarms for delivery failures
SMSAlways get user consent before sending SMS

20. SNS vs. SQS vs. EventBridge vs. Kinesis

Section titled “20. SNS vs. SQS vs. EventBridge vs. Kinesis”
FeatureAmazon SNSAmazon SQSAmazon EventBridgeAmazon Kinesis
PatternPub/Sub (push)Queue (pull)Event busStream (ordered)
DeliveryAll subscribers receive each messageSingle consumer per messageRule-based routingAll consumers read
PersistenceNo (deliver and discard)Yes (up to 14 days)NoYes (up to 365 days)
OrderingFIFO topics availableFIFO queues availableBest-effortStrict per shard
FilteringYes (filter policies)NoYes (event patterns)No
Use CaseFan-out, notificationsWork queues, decouplingSaaS event routingReal-time streaming
ScenarioRecommended Service
One event triggers multiple servicesSNS
Need durable message storage with retriesSQS
Routing events from SaaS applicationsEventBridge
High-volume ordered data processingKinesis
Mobile push notificationsSNS
SMS or email alertsSNS

This glossary includes key terms directly related to Amazon SNS.


Application-to-Application (A2A) Messaging Pattern where SNS delivers messages between software applications or services. Examples include Lambda functions, SQS queues, and HTTP endpoints .

Application-to-Person (A2P) Messaging Pattern where SNS delivers messages directly to end users via email, SMS, or mobile push notifications .

ARN (Amazon Resource Name) Unique identifier for an SNS topic. Format: arn:aws:sns:region:account-id:topic-name .


Dead-Letter Queue (DLQ) An SQS queue configured for an SNS subscription that receives messages that couldn’t be delivered after the retry policy ends .

Deduplication (FIFO) Feature that ensures duplicate messages aren’t delivered to subscribers. Requires message deduplication IDs or auto-generation .


Fan-Out The pattern where a single message published to a topic is replicated and pushed to multiple subscribers in parallel .

FIFO Topic (First-In-First-Out) Topic type that preserves strict message ordering and provides exactly-once processing. Topic names must end with .fifo .

Filter Policy A JSON policy that subscribers attach to subscriptions to receive only messages that match specified criteria. Reduces unnecessary message deliveries .

Filter Policy Scope Determines whether filtering applies to message attributes (default) or message body. Body filtering incurs additional costs .


Message The data sent from a publisher to subscribers. Maximum size is 256 KB. Can be plain text, JSON, or XML .

Message Attribute Metadata attached to a message used for filtering and routing. Includes data type (String, Number, Binary) and value .

Message Body Filtering Filtering based on content within the message payload. Incurs additional cost per GB of scanned data .

Mobile Push Notification Notifications delivered to mobile devices through platform-specific services like APNs (iOS) and FCM (Android) .


Platform Application An SNS resource that represents your mobile app registered with a push notification service (APNs, FCM, ADM, WNS) .

Pub/Sub (Publish-Subscribe) Messaging paradigm where publishers send messages to topics without knowing subscribers, and subscribers receive messages without knowing publishers .

Publisher A component that sends messages to an SNS topic .


Retry Policy Configuration that defines how SNS attempts redelivery when a subscriber endpoint is unavailable. Includes initial delay, max retries, and backoff factor .


SMS (Short Message Service) Text messaging capability in SNS supporting over 200 countries. Requires sandbox verification for production use .

Standard Topic Topic type offering high throughput with at-least-once delivery and best-effort ordering. Suitable for most use cases .

Subscriber A client that receives notifications from an SNS topic. Can be Lambda, SQS, HTTP, email, SMS, or mobile endpoint .

Subscription The registration that associates a subscriber endpoint with a topic .


Topic An access point that identifies a specific subject or event type for publishing messages. Publishers send to topics; subscribers receive from topics .


Amazon SNS is a powerful, fully managed pub/sub messaging service that enables both application-to-application and application-to-person communication at any scale. With its push-based delivery, multiple protocol support, and automatic scaling, SNS is the natural choice for building decoupled, event-driven architectures on AWS.

Key Takeaways:

  • Two topic types: Standard (high throughput) and FIFO (ordered, exactly-once)
  • Push-based delivery: No polling required—messages pushed immediately
  • Multiple protocols: Lambda, SQS, HTTP, email, SMS, mobile push
  • Message filtering: Subscribers receive only relevant messages
  • Fan-out pattern: One message triggers multiple independent services
  • Free tier: 1 million requests monthly, permanently

Getting Started Recommendations:

  • Start with Standard topics for most use cases
  • Use FIFO topics when message order or deduplication is critical
  • Implement message filtering to reduce costs and unnecessary processing
  • Configure dead-letter queues for production workloads
  • Use SNS + SQS fan-out for durable, decoupled processing
  • Enable encryption for sensitive message payloads