Ref: https://learn.cantrill.io/courses/1820301/lectures/41301398
Amazon SNS - Overview
- 🔧 Serverless PUB-SUB messaging service
- Coordinates sending & delivery of messages to multiple destinations (subscribers)
- Messages are ≤ 256kB payloads
- 💡 don't remember the max, but understand you can't send large files with SNS
- Public → NW connectivity with public endpoint
- Used heavily across AWS for notifications → e.g. CW, CFN…
Amazon SNS - Architecture
Diagram: https://github.com/acantril/aws-sa-associate-saac03/blob/main/1600-SERVERLESS_and_APPLICATION_SERVICES/00_LEARNINGAIDS/SNS-1.png
- Regionally resilient → HA, scalable, and durable within a region
- Secure → supports SSE (server-side encryption)
- SNS Topic: base entity of SNS
- Contains configuration & permissions
- 1-to-many communication
- A Publisher sends messages to a topic
- Topics have subscribers which receive messages
- Examples of supported subscribers/destinations: HTTP(S), email (-JSON), SQS, mobile push notifications, SMS messages, Lambda…
- Entities can be both a publisher and a subscriber (e.g. APIs)
- Topic policy: resource policy containing permissions of the SNS topic
- R/W permissions to topic
- Can configure cross-account access
- Other configurations
- Filters: filter messages → only those relevant to the subscriber are delivered
- Delivery Status → confirm delivery of messages to subscriber(s)
- supports statuses for HTTP(S), Lambda, SQS…
- Delivery Retries → reliable delivery: retry until message delivered successfully
- Fanout architecture: single SNS topic with multiple SQS queues as subscribers
- Allows creating multiple related workloads (e.g. processing diff sizes or bitrates for CatTube videos)
- 💡 Learn this architecture. Will feature in the exam