sns_skill
- Python
976
GitHub Stars
2
Bundled Files
2 months ago
Catalog Refreshed
4 months ago
First Indexed
Readme & install
Copy the install command, review bundled files from the catalogue, and read any extended description pulled from the listing source.
Installation
Preview and clipboard use veilstrat where the catalogue uses aiagentskills.
npx veilstrat add skill itsmostafa/aws-agent-skills --skill sns- notification-patterns.md7.7 KB
- SKILL.md9.6 KB
Overview
This skill provides programmatic control of AWS Simple Notification Service (SNS) for pub/sub messaging, mobile push, and notification workflows. It helps create and manage topics, subscriptions, message filtering, and publishing patterns using Python (boto3) and CLI examples. Use it to implement fan-out, FIFO ordering, mobile push, and reliable cross-service notifications.
How this skill works
The skill exposes operations to create and configure SNS topics (standard and FIFO), manage subscriptions across protocols (Lambda, SQS, HTTP/S, email, SMS, mobile application), and publish messages with attributes for filtering. It includes patterns for fan-out to multiple SQS queues, setting subscription filter policies, adding Lambda invoke permissions, and configuring delivery/retry policies and encryption. It provides concrete CLI and boto3 examples for each task.
When to use it
- Broadcast events to multiple consumers (fan-out)
- Deliver notifications to users via email, SMS, or mobile push
- Integrate application events with Lambda and SQS
- Enforce ordering and exactly-once semantics with FIFO topics
- Route messages to specific subscribers using filter policies
- Set up reliable delivery with retries, DLQs, and monitoring
Best practices
- Prefer SQS subscribers for durability and to decouple consumers from failures
- Use message attributes and filter policies to reduce unnecessary deliveries and cost
- Enable server-side encryption (SSE) and topic policies to secure access
- Use FIFO topics when strict ordering or deduplication is required
- Include correlation IDs and keep messages small (under 256 KB) for traceability
- Configure dead-letter queues and sensible retry/delivery policies for HTTP endpoints
Example use cases
- Order processing: publish order events to an SNS topic that fans out to analytics, fulfillment, and notification SQS queues
- Mobile notifications: send targeted push messages via Application protocol or SMS for urgent alerts
- Microservices integration: trigger Lambda functions from topic events and use filter policies to route specific event types
- Cross-account notifications: use topic policies and VPC endpoints for secure cross-account or private network delivery
- FIFO workflow: maintain strict event ordering for payment or inventory systems using FIFO topics
FAQ
Use message attributes when publishing and a FilterPolicy on the subscription. Attributes must be MessageAttributes (not included in the JSON body) and types must match the filter policy syntax.
Why isn’t my SQS queue receiving SNS messages?
Ensure the subscription is confirmed and the SQS queue policy allows sns.amazonaws.com SendMessage from the topic ARN. Also verify filter policies and that message attributes are set correctly.