Junior
What is Amazon SNS and what functionality does it provide?
sobes.tech AI
Answer from AI
Scalable, fully managed Pub/Sub messaging service.
Main features:
- Publishing messages: Senders (publishers) can publish messages to SNS topics.
- Subscribing to topics: Receivers (subscribers) can subscribe to topics of interest to receive published messages.
- Various delivery protocols: Supports message delivery via different protocols:
- HTTP/HTTPS
- SMS
- Amazon SQS
- AWS Lambda
- Message filtering: Subscribers can apply filtering rules to receive only messages from the topic that match certain attributes.
- FIFO subscriptions: Guarantee strict ordering and no message duplication in topics. Used together with SQS FIFO queues.
- Access policies: Access control to SNS topics via IAM policies.
- Encryption: Encrypting messages both in transit and at rest (using KMS).
Applications:
- Decoupling applications (loose coupling).
- Notification systems.
- Distributed workflows.
- Stream data processing.
Example AWS CLI publish command:
# Publishing a simple message
aws sns publish \
--topic-arn arn:aws:sns:us-east-1:123456789012:MyTopic \
--message "Hello from SNS!"