Over a million developers have joined DZone.

Setting Up the Amazon Simple Notification System

· Cloud Zone

Download the Essential Cloud Buyer’s Guide to learn important factors to consider before selecting a provider as well as buying criteria to help you make the best decision for your infrastructure needs, brought to you in partnership with Internap.

The Amazon SNS is a robust way to send notification messages via multiple protocols like e-mail, SMS, HTTP, etc. There are many use cases where you can use a service like this but I want to show how to use it to get notified when my EC2 server that I created in my previous post is started. Here are the steps to create the notification:

  • Create new topic
  • In the AWS Management Console go to the SNS service page and click ‘Create new topic’:
    Screen Shot 2012-12-21 at 21.43.08
    Name the Topic and press ‘Create Topic’:
    Screen Shot 2012-12-21 at 21.52.31

  • Create a subscription
  • Now subscribe to the created topic by selecting it in the overview and click ‘Create new subscription’:
    Screen Shot 2012-12-21 at 22.06.01
    As protocol choose email and fill in the mail address you want to receive the notification on:
    Screen Shot 2012-12-21 at 22.18.47
    You will see a message that a confirmation has been sent to the supplied address:
    Screen Shot 2012-12-21 at 22.19.48
    After a few seconds you will receive a mail with a link to confirm the subscription. After you click it you will see the confirmation:
    Screen Shot 2012-12-21 at 22.22.53
    When you return to the overview and refresh the view you see the topic and the subscription:
    Screen Shot 2012-12-21 at 22.49.44
    To test the subscription post a message to the topic by clicking ‘Publish to Topic’:
    Screen Shot 2012-12-21 at 22.49.44
    Enter some details for and click ‘publish’:
    Screen Shot 2012-12-21 at 23.02.11
    After a few seconds you will see the message in your inbox. Now this notification is set up the next step is to have the EC2 server sending the message when it is starting up. I will describe this in the next post.


The Cloud Zone is brought to you in partnership with Internap. Read Bare-Metal Cloud 101 to learn about bare-metal cloud and how it has emerged as a way to complement virtualized services.


Published at DZone with permission of Pascal Alma, DZone MVB. See the original article here.

Opinions expressed by DZone contributors are their own.

The best of DZone straight to your inbox.

Please provide a valid email address.

Thanks for subscribing!

Awesome! Check your inbox to verify your email so you can start receiving the latest in tech news and resources.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}