‫Okay, so now let's talk about
‫the second way we can decouple our application using SNS.
‫So what if you want to send one message to many receivers?
‫We can go the route of direct integration.
‫For example, having a bank service
‫sending an email notification
‫then talking to a fraud service,
‫talking to a shipping service
‫and talking to the SQS queue.
‫But that would be quite complicated
‫because we need to write four direct integrations.
‫Instead, we can use something
‫called a pub/sub type of integration
‫in which we have an SNS topic
‫and the buying service will be sending a message
‫into our SNS topic.
‫And the topic automatically will be smart enough
‫to send a notification via email to the fraud service,
‫to the shipping service and even to an SQS queue.
‫So this is the premise of SNS.
‫SNS stands for Simple Notification Service
‫and the event publishers will only send messages
‫to one SNS topic.
‫And you can have as many event subscribers as you want
‫to listen to the SNS topic notifications.
‫Each subscriber to the topic will get all the messages.
‫So this is different from SQS
‫where the consumers were sharing the messages.
‫In this example, each subscriber to the topic
‫will get all the messages sent to the SNS topic.
‫Each SNS topic can have more than 12 million
‫subscriptions per topic
‫and also we have a soft limit
‫of 100,000 topic limits for each account.
‫So SNS has many destinations,
‫it can publish to many subscribers
‫and from the AWS services side
‫we have SQS, Lambda and Kinesis Data Firehouse
‫that can be all targets of our SNS publish action.
‫But also we can send emails directly from SNS.
‫We can send SMS and mobile notifications
‫and finally, we can send data directly
‫into an HTTP or HTTPS endpoint.
‫So bottom line is, any time in the exam
‫you see notification, publish subscribe,
‫subscribers, et cetera, et cetera.
‫Then think about Amazon SNS.
‫Okay, this is the first lecture,
‫I hope you liked it.
‫And I will see you in the next lecture.