- Now let's review the Amazon Simple Notification Service,
or SNS.
Now, with Amazon Simple Notification Service, or SNS,
we have the ability to send notifications.
And this is done through a publish/subscribe kind of model.
These messages are pushed to wherever they're going.
There's no need for another system to pull the service.
In fact, it can't pull.
And so again, these messages are pushed.
And so the way SNS works is that we create,
within the service, we create topics.
And we then subscribe to those topics
in a number of different ways.
We can subscribe via email,
we can choose to get a plain email,
a plain text email or a JSON encoded email.
We could subscribe HTTP or HTTP/S in points.
Through text message.
We could also subscribe simple Q service queues.
to the Simple Notification Service Topics.
So that as messages go into Simple Notification Service,
that could then push them into a queue.
That's a very powerful pattern,
especially if you're using multiple queues.
That pattern is called the fan out pattern,
where one message goes through
the Simple Notification Service,
and then gets sent into multiple queues
so that we can perform, perhaps,
several different operations on the same message.
We could also leverage Mobile Push notifications as well.
Now, another important thing to keep in mind
about the Simple Notification Service
is that the order of messages is not guaranteed.
So messages could very well
reach wherever they're going out of order.
Right, so if you do need some kind of
order to those messages,
then within the message you would have to include
some kind of piece of data that indicates that order.
It's also worth noting that messages
are not stored in SNS.
Right, so once a message has been
sent through the topic and pushed to where it's going,
it's gone, you're not going to retrieve it again.
If it's been lost in cyberspace,
then you'll have to resend it again.
Now, HTTP and HTTP/S in points
do have a built in retry,
but that's still different than
actually storing the messages.
And so, Amazon SNS is an important service
to take a look at and get to know,
because it does play a very key role,
a very central role in a number of architectures,
especially when it comes to monitoring
and alerting you as to issues that may be going on.
As you've seen throughout things
that we've already talked about,
Simple Notification Service is used
by a number of other services
to inform you of things happening within your environment.
So, like we've seen earlier on,
we can leverage Simple Notification Service
with Amazon Cloud Watch,
so that alarms can send a notifications,
other services like AWS Config,
and Code Pipeline and Cloud Formation,
so that we can receive notifications
as changes are made to our environment,
and as other automated processes
move through their life cycle of events.
So again, keep in mind that
when it comes to notifications,
especially notifications about your Amazon Environment,
Amazon Simple Notification Service, or SNS
is a key service to be, not only aware of,
but very familiar with.