- Now let's talk about Amazon Simple Notification Service,
otherwise known as SNS.
With Amazon Simple Notification Service we have
a slightly different model than what what we saw
with the Queue Service.
With the Queue Service it was based on putting and pulling,
or polling and actually asking for messages,
where they were buffered within the service.
Here it's more of a publish/subscribe method,
where what we do is we create what we call topics within
the Simple Notification Service
and then when we publish messages to those topics,
those messages get delivered by way of either, email,
we can deliver those messages to a HTTP or HTTPS endpoint,
we could deliver them through mobile text message,
through mobile push notification,
or we could have those messages pushed into
a queue under the Amazon Simple Queue Service.
These would be what we would call our subscriptions.
We would subscribe to these topics through
these various methods.
And again, when messages are published into those topics
those messages or notifications are then delivered to those
subscribers via what ever methods they had subscribed to.
So perhaps our VideoStatus topic we want to subscribe via
a JSON email and a text message,
and our OrderStatus topic,
perhaps we want to subscribe via HTTPS and we could
subscribe a Simple Queue Service queue to that so that we
can leverage some other system to pull from that queue and
allow them to buffer up and pull asynchronously.
Now, with the Simple Notification Service, it's important
to know that the order is not guaranteed, very much like
the Simple Queue Service, and messages are not stored.
As soon as a message goes into a topic, and then once it's
delivered out to its subscription endpoints,
it is no longer stored.
And it's also important to understand that we do have
a 64K message limit.
So, the Amazon Simple Notification Service is a really
great way to get messages out.
Perhaps you want to get messages out to
some kind of an email system.
You want to get a message into something like pager duty.
You want to be notified of a cloud watch alarm.
You want to be notified of something going on
within your application.
So that is the Amazon Simple Notification Service.