Sns
AWS SNS notification service for pub/sub messaging.
Install
npx skills add itsmostafa/aws-agent-skills --skill sns -g -a claude-code -y- Repository
- itsmostafa/aws-agent-skills1.2k
- Category
- DevOps
- Updated
- 9d ago
- License
- MIT
- Context cost
- Mediumabout 2,374 tokens
- Runs scripts
- No, instructions only
What it does
AWS SNS notification service for pub/sub messaging. Use when creating topics, managing subscriptions, configuring message filtering, sending notifications, or setting up mobile push.
AWS SNS
Amazon Simple Notification Service (SNS) is a fully managed pub/sub messaging service for application-to-application (A2A) and application-to-person (A2P) communication.
Table of Contents
Core Concepts
Topics
Named channels for publishing messages. Publishers send to topics, subscribers receive from topics.
Topic Types
| Type | Description | Use Case |
|---|---|---|
| Standard | Best-effort ordering, at-least-once | Most use cases |
| FIFO | Strict ordering, exactly-once | Order-sensitive |
Subscription Protocols
| Protocol | Description |
|---|---|
| Lambda | Invoke Lambda function |
| SQS | Send to SQS queue |
| HTTP/HTTPS | POST to endpoint |
| Send email | |
| SMS | Send text message |
| Application | Mobile push notification |
Message Filtering
Route messages to specific subscribers based on message attributes.
Common Patterns
Create Topic and Subscribe
AWS CLI:
# Create standard topic
aws sns create-topic --name my-topic
# Create FIFO topic
aws sns create-topic \
--name my-topic.fifo \
--attributes FifoTopic=true
# Subscribe Lambda
aws sns subscribe \
--topic-arn arn:aws:sns:us-east-1:123456789012:my-topic \
--protocol lambda \
--notification-endpoint arn:aws:lambda:us-east-1:123456789012:function:my-function
# Subscribe SQS
aws sns subscribe \
--topic-arn arn:aws:sns:us-east-1:123456789012:my-topic \
--protocol sqs \
--notification-endpoint arn:aws:sqs:us-east-1:123456789012:my-queue
# Subscribe email
aws sns subscribe \
--topic-arn arn:aws:sns:us-east-1:123456789012:my-topic \
--protocol email \
--notification-endpoint user@example.com
boto3:
import boto3

