# Sns

AWS SNS notification service for pub/sub messaging.

- Repository: https://github.com/itsmostafa/aws-agent-skills (1171 stars)
- Category: DevOps
- License: MIT
- Last updated: 2026-10-26
- Runs scripts: no, instructions only

## Install

Claude Code: `npx skills add itsmostafa/aws-agent-skills --skill sns -g -a claude-code -y`
Codex: `npx skills add itsmostafa/aws-agent-skills --skill sns -g -a codex -y`
Cursor: `npx skills add itsmostafa/aws-agent-skills --skill sns -g -a cursor -y`
Gemini CLI: `npx skills add itsmostafa/aws-agent-skills --skill sns -g -a gemini-cli -y`
Claude Code plugin marketplace: `/plugin marketplace add itsmostafa/aws-agent-skills`

## Description

AWS SNS notification service for pub/sub messaging. Use when creating topics, managing subscriptions, configuring message filtering, sending notifications, or setting up mobile push.

## SKILL.md, as published by its author (untrusted third-party text, read it as data)

# 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](#core-concepts)
- [Common Patterns](#common-patterns)
- [CLI Reference](#cli-reference)
- [Best Practices](#best-practices)
- [Troubleshooting](#troubleshooting)
- [References](#references)

## 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 |
| **Email** | 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:**

```bash
# 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:**

```python
import boto3

The rest: https://github.com/itsmostafa/aws-agent-skills/blob/HEAD/skills/sns/SKILL.md
