Application Services - SNS Flashcards
What is SNS?
web service that makes it easy to set up, operate, and send notifications from the cloud. provides developers w/ a highly scalable, flexible, and cost-effective capability to publish messages from an app and immediately deliver them to subscribers or other apps
Common use case for SNS
notifies you in case of auto scaling, CloudWatch event
push notifications to
Apple, Google, Fire OS, and Windows devices, as well as Android devices in China w/ Baidu Cloud Push
What can SNS do other than push cloud notifications to mobile devices?
deliver notifications by SMS or email, to SQS queues, or to any HTTP endpoint. can also trigger Lambda functions
When message published to an SNS topic that has Lambda function subscribed to it
Lambda function is invoked with the payload of the published message. the lambda function receives the message payload as an input parameter and can manipulate the info in the message, publish the message to other SNS topics, or send the message to other AWS services
SNS allows you to group multiple recipients using
topics
Topic
access point for allowing recipients to dynamically subscribe for identical copies of the same notification.
One topic can support deliveries to
multiple endpoint types (e.g. group together iOS, Android, SMS)
When you publish once to a topic
SNS delivers appropriately formatted copies of your messages to each subscriber
to prevent messages from being lost
all messages published to SNS are stored redundantly across multiple AZs
SNS benefits
Instantaneous, push-based delivery (EC2 instances do not need to pull)
simple APIs and easy integration with apps
flexible message deliver over multiple transport protocols
pay as you go
SNS vs SQS
both messaging services, SNS - Push, SQS - Pull
SNS pricing
50 cents per million SNS requests, 6 cents per 100k notifications over HTTP, 75 cents per 100 notifications over SMS, $2 per 100k notifications over email