aws-sns
БесплатноБез исполняемых скриптовНе проверенUse Amazon SNS for pub/sub messaging and notifications. Create topics and manage subscriptions across protocols (SQS, Lambda, HTTP, email, SMS). Configure…
Об этом скилле
AWS SNS
Overview
Amazon Simple Notification Service (SNS) is a fully managed pub/sub messaging service. Publishers send messages to topics, and subscribers receive them via SQS, Lambda, HTTP/S, email, SMS, or mobile push. It's the glue for fan-out architectures.
Instructions
Core concepts
- Topic — a logical channel for publishing messages
- Subscription — an endpoint subscribed to a topic (SQS, Lambda, HTTP, email, SMS)
- Message filtering — JSON policy to route only matching messages to a subscriber
- Fan-out — one message published, delivered to all subscribers simultaneously
- FIFO Topic — ordered, deduplicated delivery (pairs with FIFO SQS queues)
Topics
# Create a standard topic
aws sns create-topic --name order-events
# Create a FIFO topic
aws sns create-topic \
--name order-events.fifo \
--attributes FifoTopic=true,ContentBasedDeduplication=true
# List topics
aws sns list-topics --query 'Topics[].TopicArn' --output table
Subscriptions
# Subscribe an SQS queue to a topic
aws sns subscribe \
--topic-arn arn:aws:sns:us-east-1:111122223333:order-events \
--protocol sqs \
--notification-endpoint arn:aws:sqs:us-east-1:111122223333:order-processing
# Subscribe a Lambda function
aws sns subscribe \
--topic-arn arn:aws:sns:us-east-1:111122223333:order-events \
--protocol lambda \
--notification-endpoint arn:aws:lambda:us-east-1:111122223333:function:process-order
A Lambda subscription also needs a resource policy that lets SNS invoke the function:
aws lambda add-permission --function-name process-order \
--statement-id sns-order-events --action lambda:InvokeFunction \
--principal sns.amazonaws.com \
--source-arn arn:aws:sns:us-east-1:111122223333:order-events
# Subscribe an HTTP endpoint
aws sns subscribe \
--topic-arn arn:aws:sns:us-east-1:111122223333:order-events \
--protocol https \
--notification-endpoint https://api.myapp.com/webhooks/orders
# Subscribe email (requires confirmation)
aws sns subscribe \
--topic-arn arn:aws:sns:us-east-1:111122223333:order-events \
--protocol email \
--notification-endpoint [email protected]
HTTP/S and email subscriptions stay PendingConfirmation until the endpoint confirms (the endpoint receives a SubscriptionConfirmation message with a SubscribeURL/token; call aws sns confirm-subscription).
# Deliver the original body to SQS/HTTP without the SNS JSON envelope, and park failures in a DLQ
aws sns set-subscription-attributes \
--subscription-arn arn:aws:sns:us-east-1:111122223333:order-events:abc-123 \
--attribute-name RawMessageDelivery --attribute-value true
aws sns set-subscription-attributes \
--subscription-arn arn:aws:sns:us-east-1:111122223333:order-events:abc-123 \
--attribute-name RedrivePolicy \
--attribute-value '{"deadLetterTargetArn":"arn:aws:sqs:us-east-1:111122223333:order-events-dlq"}'
# List subscriptions for a topic
aws sns list-subscriptions-by-topic \
--topic-arn arn:aws:sns:us-east-1:111122223333:order-events
Publishing Messages
# Publish a message to a topic
aws sns publish \
--topic-arn arn:aws:sns:us-east-1:111122223333:order-events \
--message '{"orderId":"12345","status":"completed","amount":99.99}' \
--message-attributes '{
"event_type": {"DataType":"String","StringValue":"order.completed"},
"priority": {"DataType":"String","StringValue":"high"}
}'
# Publish to FIFO topic
aws sns publish \
--topic-arn arn:aws:sns:us-east-1:111122223333:order-events.fifo \
--message '{"orderId":"12345","status":"completed"}' \
--message-group-id "customer-789" \
--message-deduplication-id "order-12345-completed"
# Publish with different payloads per protocol
aws sns publish \
--topic-arn arn:aws:sns:us-east-1:111122223333:alerts \
--message-structure json \
--message '{
"default": "Order 12345 completed",
"email": "Your order #12345 has been completed. Thank you!",
"sqs": "{\"orderId\":\"12345\",\"status\":\"completed\"}"
}'
Message Filtering
# Set filter policy — subscriber only gets "order.completed" events
aws sns set-subscription-attributes \
--subscription-arn arn:aws:sns:us-east-1:111122223333:order-events:abc-123 \
--attribute-name FilterPolicy \
--attribute-value '{
"event_type": ["order.completed"],
"priority": ["high", "critical"]
}'
# Filter on message body (not just attributes)
aws sns set-subscription-attributes \
--subscription-arn arn:aws:sns:us-east-1:111122223333:order-events:abc-123 \
--attribute-name FilterPolicyScope \
--attribute-value MessageBody
aws sns set-subscription-attributes \
--subscription-arn arn:aws:sns:us-east-1:111122223333:order-events:abc-123 \
--attribute-name FilterPolicy \
--attribute-value '{"status": ["completed"], "amount": [{"numeric": [">=", 100]}]}'
Установить aws-sns в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл aws-sns?
Use Amazon SNS for pub/sub messaging and notifications. Create topics and manage subscriptions across protocols (SQS, Lambda, HTTP, email, SMS). Configure message filtering, mobile push notifications, and fan-out architectures.
Как установить скилл aws-sns?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл aws-sns запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
doc-coauthoring
Guide users through a structured workflow for co-authoring documentation. Use when user wants to write documentation, proposals, technical specs, decision…
от Anthropicacademy-guide
Stop and check this skill before finishing any reply to a question about how to use Claude or a Claude product — it recommends matching courses, tutorials…
от Anthropicinternal-comms
A set of resources to help me write all kinds of internal communications, using the formats that my company likes to use. Claude should use this skill…
от Anthropicskill-development
This skill should be used when the user wants to "create a skill", "add a skill to plugin", "write a new skill", "improve skill description", "organize skill…
от Anthropic