SNS Flashcards
What is SNS?
Amazon Simple Notification Service (SNS) is a highly available, durable, secure, fully managed pub/sub messaging service
How many event receivers can you define on SNS?
A lot (10 000 000 per topic)
What do the event subscriptors listen to?
To an SNS topic
Who sends messages to an SNS topic?
The event publisher
What messages will get an SNS event subscriber?
all the messages in the topic (can filter)
How many topics can you define on SNS?
A lot (100 000)
What are the possible SNS subscribers?
- SQS
- HTTP / HTTPS (with delivery retries – how many times)
- Lambda
- Emails
- SMS messages
- Mobile Notifications
What services can send data directly to SNS?
Many AWS services can send data directly to SNS for notifications
• CloudWatch (for alarms)
• Auto Scaling Groups notifications
• Amazon S3 (on bucket events)
• CloudFormation (upon state changes => failed to build, etc)
• Etc…
How can you publish to SNS within your AWS server
Using SDK or CLI:
• Create a topic
• Create a subscription (or many)
• Publish to the topic
What can you use to publish to SNS for mobile apps SDK?
Direct Publish o Create a platform application o Create a platform endpoint o Publish to the platform endpoint o Works with Google GCM, Apple APNS, Amazon ADM…
What is Fan Out?
- Push once in SNS, receive in all SQS queues that are subscribers
- Fully decoupled, no data loss
How is encryption in SNS?
o In-flight encryption using HTTPS API (Enabled by default)
o At-rest encryption using KMS keys (Disabled by default)
o Client-side encryption if the client wants to perform encryption/decryption itself
How is SNS access regulated?
- IAM policies to regulate access to the SNS API
- SNS Access Policies (similar to S3 bucket policies)
What is useful for SNS Access Policies?
o Useful for cross-account access to SNS topics
o Useful for allowing other services (S3…) to write to an SNS topic
What limitation is present in Fan Out pattern?
SNS cannot send messages to SQS FIFO queues (AWS limitation)