SNS is a fully managed pub/sub message delivery service hat enables you to decouple microservices, distributed systems, and serverless applications.
SNS can be used for event notification, notifying admins of system alerts (CloudWatch), mobile push (no polling) notification.
- Messages (<= 256 KB) are sent to a topic and delivered to subscribers.
- Typically, JSON key-value pairs
- Resource policies define who can access a topic.
- For some AWS services (EC2 or Lambda), IAM roles are used.
- A configuration for SNS. Messages are sent to a topic.
- FIFO vs. Standard
- In most cases, you can use the standard topic
- If you need the strictly-preserved message ordering, you can use the FIFO topic.
- A subscriber to a FIFO topic must be SQS.
- Endpoints that receive a message
- HTTP, Email, SQS, Lambda, or Mobile push notification
- A subscriber can filter messages from the topic by assigning a filter policy.
- An entity that sends messages to a topic
- Custom Application, S3, CloudWatch, or CloudFormation
- SNS Can be used with the AWS Console, API, CLI, and multiple SDKs.
- Using Amazon SNS topics, publisher systems can fan out messages to a large number of subscriber endpoints for parallel processing, including Amazon SQS queues, AWS Lambda functions, and HTTP/S webhooks.
- Additionally, SNS can be used to fan out notifications to end users using mobile push, SMS, and email.