AWS SNS notification service for pub/sub messaging. An agent skill from itsmostafa/aws-agent-skills.

MITAuto-check passedBackend & APIs

Install Sns

skills CLI
$ npx skills add itsmostafa/aws-agent-skills --skill sns -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install itsmostafa/aws-agent-skills sns --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/itsmostafa/aws-agent-skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/sns .claude/skills/sns && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
sns
GitHub stars
1.2k
Token cost
~2.4k tokens
SKILL.md length
360 words
Files
2
Skills in repo
17
Repo updated
First seen
Licence
MIT

At a glance

AWS SNS notification service for pub/sub messaging. An agent skill from itsmostafa/aws-agent-skills.

  • Works in 3 steps: Subscription is confirmed (not pending) → Filter policy matches message attributes → Target permissions (Lambda, SQS)
  • Creating topics
  • SKILL.md covers Table of Contents, Core Concepts, Common Patterns and CLI Reference, plus 3 more sections
  • Calls aws

What it does

Sns is an agent skill from itsmostafa/aws-agent-skills. AWS SNS notification service for pub/sub messaging. Use when creating topics, managing subscriptions, configuring message filtering, sending notifications, or setting up mobile push.

Its SKILL.md is about 2.4k tokens, which your agent loads only when the skill is triggered. The skill folder holds 1 other file (for example `notification-patterns.md`).

It sits in Backend & APIs, covering Event-driven systems. It works with Amazon Web Services. The repository describes itself as: AWS Skills for Agents. The licence is MIT.

When your agent uses it

  • Creating topics
  • Managing subscriptions
  • Configuring message filtering
  • Sending notifications

Example prompts

  • “/sns”

Requirements

  • Python 3

Workflow steps

3 steps, taken from the first numbered list in SKILL.md.

  1. Subscription is confirmed (not pending)
  2. Filter policy matches message attributes
  3. Target permissions (Lambda, SQS)

What it can do on your machine

Read from SKILL.md and the folder at commit e786d25. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • aws

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    Links to these hosts (documentation or services it may open):

    • docs.aws.amazon.com
    • boto3.amazonaws.com

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Sns loads about 2.4k tokens when it runs. Until then it costs about 47 tokens; SKILL.md has 360 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~47
When it runs · the whole SKILL.md, loaded when a task matches
~2.4k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from itsmostafa/aws-agent-skills at commit e786d25, republished under its MIT licence (© itsmostafa). 360 words, ~2,449 tokens.

Download SKILL.mdSave it as .claude/skills/sns/SKILL.md (or your agent's skills folder). This skill also uses 1 other file; get the full folder from GitHub.
name
sns
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.
last_updated
2026-01-07
doc_source
https://docs.aws.amazon.com/sns/latest/dg/

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
TypeDescriptionUse Case
StandardBest-effort ordering, at-least-onceMost use cases
FIFOStrict ordering, exactly-onceOrder-sensitive
Subscription Protocols
ProtocolDescription
LambdaInvoke Lambda function
SQSSend to SQS queue
HTTP/HTTPSPOST to endpoint
EmailSend email
SMSSend text message
ApplicationMobile 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

sns = boto3.client('sns')

# Create topic
response = sns.create_topic(Name='my-topic')
topic_arn = response['TopicArn']

# Subscribe Lambda
sns.subscribe(
    TopicArn=topic_arn,
    Protocol='lambda',
    Endpoint='arn:aws:lambda:us-east-1:123456789012:function:my-function'
)

# Subscribe SQS with filter
sns.subscribe(
    TopicArn=topic_arn,
    Protocol='sqs',
    Endpoint='arn:aws:sqs:us-east-1:123456789012:order-queue',
    Attributes={
        'FilterPolicy': '{"event_type": ["order_created", "order_updated"]}'
    }
)
Publish Messages
python
import boto3
import json

sns = boto3.client('sns')
topic_arn = 'arn:aws:sns:us-east-1:123456789012:my-topic'

# Simple publish
sns.publish(
    TopicArn=topic_arn,
    Message='Hello, World!',
    Subject='Notification'
)

# Publish with attributes (for filtering)
sns.publish(
    TopicArn=topic_arn,
    Message=json.dumps({'order_id': '12345', 'status': 'created'}),
    MessageAttributes={
        'event_type': {
            'DataType': 'String',
            'StringValue': 'order_created'
        },
        'priority': {
            'DataType': 'Number',
            'StringValue': '1'
        }
    }
)

# Publish to FIFO topic
sns.publish(
    TopicArn='arn:aws:sns:us-east-1:123456789012:my-topic.fifo',
    Message=json.dumps({'order_id': '12345'}),
    MessageGroupId='order-12345',
    MessageDeduplicationId='unique-id'
)
Message Filtering
bash
# Add filter policy to subscription
aws sns set-subscription-attributes \
  --subscription-arn arn:aws:sns:us-east-1:123456789012:my-topic:abc123 \
  --attribute-name FilterPolicy \
  --attribute-value '{
    "event_type": ["order_created"],
    "priority": [{"numeric": [">=", 1]}]
  }'

Filter policy examples:

json
// Exact match
{"event_type": ["order_created", "order_updated"]}

// Prefix match
{"customer_id": [{"prefix": "PREMIUM-"}]}

// Numeric comparison
{"price": [{"numeric": [">=", 100, "<=", 500]}]}

// Exists check
{"customer_id": [{"exists": true}]}

// Anything but
{"event_type": [{"anything-but": ["deleted"]}]}

// Combined
{
  "event_type": ["order_created"],
  "region": ["us-east", "us-west"],
  "priority": [{"numeric": [">=", 1]}]
}
Fan-Out Pattern (SNS to Multiple SQS)
python
import boto3
import json

sns = boto3.client('sns')
sqs = boto3.client('sqs')

# Create topic
topic = sns.create_topic(Name='orders-topic')
topic_arn = topic['TopicArn']

# Create queues for different processors
queues = {
    'analytics': sqs.create_queue(QueueName='order-analytics')['QueueUrl'],
    'fulfillment': sqs.create_queue(QueueName='order-fulfillment')['QueueUrl'],
    'notification': sqs.create_queue(QueueName='order-notification')['QueueUrl']
}

# Subscribe each queue
for name, queue_url in queues.items():
    queue_arn = sqs.get_queue_attributes(
        QueueUrl=queue_url,
        AttributeNames=['QueueArn']
    )['Attributes']['QueueArn']

    sns.subscribe(
        TopicArn=topic_arn,
        Protocol='sqs',
        Endpoint=queue_arn
    )

# One publish reaches all queues
sns.publish(
    TopicArn=topic_arn,
    Message=json.dumps({'order_id': '12345', 'total': 99.99})
)
Lambda Permission for SNS
bash
aws lambda add-permission \
  --function-name my-function \
  --statement-id sns-trigger \
  --action lambda:InvokeFunction \
  --principal sns.amazonaws.com \
  --source-arn arn:aws:sns:us-east-1:123456789012:my-topic

CLI Reference

Topic Management
CommandDescription
aws sns create-topicCreate topic
aws sns delete-topicDelete topic
aws sns list-topicsList topics
aws sns get-topic-attributesGet topic settings
aws sns set-topic-attributesUpdate topic settings
Subscriptions
CommandDescription
aws sns subscribeCreate subscription
aws sns unsubscribeRemove subscription
aws sns list-subscriptionsList all subscriptions
aws sns list-subscriptions-by-topicList topic subscriptions
aws sns confirm-subscriptionConfirm pending subscription
Publishing
CommandDescription
aws sns publishPublish message

Best Practices

Show full SKILL.md (153 more words)Show less
Reliability
  • Use SQS for durability — SNS is push-based, SQS queues messages
  • Implement retries for HTTP/HTTPS endpoints
  • Configure DLQ for failed deliveries
  • Use FIFO topics for ordering requirements
Security
  • Use topic policies to control access
  • Enable encryption with SSE
  • Use VPC endpoints for private access
bash
# Enable SSE
aws sns set-topic-attributes \
  --topic-arn arn:aws:sns:us-east-1:123456789012:my-topic \
  --attribute-name KmsMasterKeyId \
  --attribute-value alias/my-key
Cost Optimization
  • Use message filtering to reduce unnecessary deliveries
  • Batch operations where possible
  • Monitor and clean up unused topics/subscriptions
Message Design
  • Keep messages small (256 KB limit)
  • Use message attributes for routing
  • Include correlation IDs for tracing

Troubleshooting

Subscription Not Receiving Messages

Check:

  1. Subscription is confirmed (not pending)
  2. Filter policy matches message attributes
  3. Target permissions (Lambda, SQS)
bash
# Check subscription status
aws sns list-subscriptions-by-topic \
  --topic-arn arn:aws:sns:us-east-1:123456789012:my-topic

# Check subscription attributes
aws sns get-subscription-attributes \
  --subscription-arn arn:aws:sns:us-east-1:123456789012:my-topic:abc123
HTTP Endpoint Not Working

Debug:

bash
# Check delivery status logging
aws sns set-topic-attributes \
  --topic-arn arn:aws:sns:us-east-1:123456789012:my-topic \
  --attribute-name DeliveryPolicy \
  --attribute-value '{
    "http": {
      "defaultHealthyRetryPolicy": {
        "minDelayTarget": 20,
        "maxDelayTarget": 20,
        "numRetries": 3,
        "numMaxDelayRetries": 0,
        "numNoDelayRetries": 0,
        "numMinDelayRetries": 0,
        "backoffFunction": "linear"
      }
    }
  }'
Messages Not Matching Filter

Verify:

  • Message attributes are set (not in body)
  • Attribute types match (String vs Number)
  • Filter policy syntax is correct
python
# Correct: attributes must be message attributes
sns.publish(
    TopicArn=topic_arn,
    Message='body content',
    MessageAttributes={
        'event_type': {
            'DataType': 'String',
            'StringValue': 'order_created'  # This is filtered
        }
    }
)

# Wrong: this won't be filtered
sns.publish(
    TopicArn=topic_arn,
    Message=json.dumps({'event_type': 'order_created'})  # Not filtered
)
SQS Not Receiving from SNS

Check SQS queue policy:

json
{
  "Version": "2012-10-17",
  "Statement": [
    {
      "Effect": "Allow",
      "Principal": {"Service": "sns.amazonaws.com"},
      "Action": "sqs:SendMessage",
      "Resource": "arn:aws:sqs:us-east-1:123456789012:my-queue",
      "Condition": {
        "ArnEquals": {
          "aws:SourceArn": "arn:aws:sns:us-east-1:123456789012:my-topic"
        }
      }
    }
  ]
}

References

© itsmostafa, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 1 other file in skills/sns of itsmostafa/aws-agent-skills.

  • SKILL.md
  • notification-patterns.md

Open the folder on GitHubat commit e786d25

Compare with similar skills

Sns next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Sns compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Sns this skillitsmostafa/aws-agent-skills1.2k—~2.4kAutomated safety check: PassMIT
AWS Serverless Edazxkane/aws-skills3674 repos~3.2kAutomated safety check: PassMIT
FoundatioFoundatioFx/Foundatio2.1k—~3.9kAutomated safety check: PassApache-2.0
Processing S3 Uploads With Step Functionsaws/agent-toolkit-for-aws2.8k—~4kAutomated safety check: PassApache-2.0
AWS Serverlessdavila7/claude-code-templates32k8 repos~2kAutomated safety check: PassMIT
AWS Lambda Microvmsawslabs/agent-plugins9151 repos~4.1kAutomated safety check: PassApache-2.0

Similar skills

  • AWS Serverless Eda

    zxkane/aws-skills

    AWS serverless and event-driven architecture expert based on Well-Architected Framework.

    367 GitHub starsUsed in 4 repos~3.2k tokens
    Backend & APIsAuto-check passed
  • Foundatio

    FoundatioFx/Foundatio

    A skill your agent uses when working with Foundatio infrastructure abstractions for .NET -- caching, queuing, messaging, file storage, distributed locking, or background jobs.

    2.1k GitHub stars~3.9k tokensUpdated yesterday
    Backend & APIsAuto-check passed
  • Official

    Deploy an event-driven workflow that routes S3 uploads to either Lambda or Fargate via Step Functions based on file size.

    2.8k GitHub stars~4k tokensUpdated yesterday
    Backend & APIsAuto-check passed
  • AWS Serverless

    davila7/claude-code-templates

    Specialized skill for building production-ready serverless applications on AWS.

    32k GitHub starsUsed in 8 repos~2k tokens
    Backend & APIsAuto-check passed
  • AWS Lambda Microvms

    awslabs/agent-plugins

    Official

    Build, run, debug, and operate applications on AWS Lambda MicroVMs — Firecracker-isolated, snapshot-resumable serverless compute environments that run inside a container with up to 8-hour lifetimes.

    915 GitHub starsUsed in 1 repo~4.1k tokens
    Backend & APIsAuto-check passed
  • Tech Matrix

    sickn33/agentic-awesome-skills

    Reference document for monopoly tech-matrix. An agent skill from sickn33/agentic-awesome-skills.

    47k GitHub starsUsed in 1 repo~3.1k tokens
    Backend & APIsAuto-check passed

More from itsmostafa/aws-agent-skills

All 17 skills in this repo
  • API Gateway

    itsmostafa/aws-agent-skills

    AWS API Gateway for REST and HTTP API management. An agent skill from itsmostafa/aws-agent-skills.

    1.2k GitHub starsUsed in 1 repo~2.2k tokens
    Auto-check passed
  • Bedrock

    itsmostafa/aws-agent-skills

    AWS Bedrock foundation models for generative AI. An agent skill from itsmostafa/aws-agent-skills.

    1.2k GitHub starsUsed in 1 repo~4.9k tokens
    Auto-check passed
  • Cognito

    itsmostafa/aws-agent-skills

    AWS Cognito user authentication and authorization service. An agent skill from itsmostafa/aws-agent-skills.

    1.2k GitHub starsUsed in 1 repo~2.3k tokens
    Auto-check passed
  • Ecs

    itsmostafa/aws-agent-skills

    AWS ECS container orchestration for running Docker containers.

    1.2k GitHub starsUsed in 1 repo~4.7k tokens
    Auto-check passed
  • Cloudformation

    itsmostafa/aws-agent-skills

    AWS CloudFormation infrastructure as code for stack management.

    1.2k GitHub stars~2.5k tokensUpdated 3 days ago
    Auto-check passed
  • Cloudwatch

    itsmostafa/aws-agent-skills

    AWS CloudWatch monitoring for logs, metrics, alarms, and dashboards.

    1.2k GitHub stars~3.5k tokensUpdated 3 days ago
    Auto-check passed

Categories

Questions about Sns

What does Sns do?

AWS SNS notification service for pub/sub messaging. An agent skill from itsmostafa/aws-agent-skills. Sns is an agent skill from itsmostafa/aws-agent-skills. AWS SNS notification service for pub/sub messaging.

When should I use Sns?

Sns fits situations like: creating topics; managing subscriptions; configuring message filtering; sending notifications.

How do I install Sns in Claude Code?

Run `npx skills add itsmostafa/aws-agent-skills --skill sns -a claude-code`. Or copy the skill folder (skills/sns in itsmostafa/aws-agent-skills) into .claude/skills/sns in your project. Claude Code loads it when a task matches its description.

How do I install Sns in Codex?

Run `npx skills add itsmostafa/aws-agent-skills --skill sns -a codex`. Or copy the skill folder (skills/sns in itsmostafa/aws-agent-skills) into .agents/skills/sns in your project. Codex loads it when a task matches its description.

Can I use Sns in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add itsmostafa/aws-agent-skills --skill sns -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/sns, .gemini/skills/sns, .github/skills/sns and .opencode/skills/sns in your project.

What does Sns need to run?

Going by SKILL.md and its folder, Sns needs the command-line tools its instructions call (aws). Our summary lists: Python 3.

Does Sns access the network?

SKILL.md names 2 domains. As links in the text: docs.aws.amazon.com and boto3.amazonaws.com. This is read from the text; nothing was executed.

Is Sns safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Sns use?

Sns is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Sns use?

About 2.4k tokens (SKILL.md is roughly 9.8k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Sns?

Skills that share tags, products or a category with Sns: AWS Serverless Eda (zxkane/aws-skills, 367 stars), Foundatio (FoundatioFx/Foundatio, 2.1k stars), Processing S3 Uploads With Step Functions (aws/agent-toolkit-for-aws, 2.8k stars) and AWS Serverless (davila7/claude-code-templates, 32k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Sns?

itsmostafa (a GitHub user) maintains it in itsmostafa/aws-agent-skills, which has 1,161 GitHub stars. The repository holds 17 skills in this directory. The repository was last updated on October 5, 2026.

Source: itsmostafa/aws-agent-skills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.