Amazon SNS Setup

This project uses the Amazon Simple Notification Service to send notifications such as SMS messages, emails, and more. The SNS service provides a simple publish web service which the Arduino can call directly using the CC3000. Once a notification is published, it will be sent to all subscribers of the notification topic. Using SNS you can easily control how and where notifications of the pet food bowl are delivered directly through Amazon's web interface.

One thing to note is the pricing of the SNS service. You can currently send 100 SMS messages and 1000 emails a month for free. If you exceed these limits you will be charged a small fee, so be careful with your SNS use in projects. The code for this project implements a configurable time-based limit of how often a notification can be published. Using a rate limit like this will help keep you from exceeding the limits of the SNS service free tier.

Before you can set up the SNS service, you must first create an Amazon Web Service account if you don't have one already. To create an account you can follow the steps under 'Sign up for the Service' at this link. Make sure to save the access key and secret access keys for your AWS account in a handy place as they will be needed later in the configuration of the Arduino sketch.

Once you have an AWS account, follow the steps below to setup SNS publishing for this project:
Navigate to http://aws.amazon.com/ and access the 'AWS Management Console' link in the upper right of the page.
Click the SNS service link in the list of Amazon services.
For the best performance, switch to a different region which is near your physical location using the region list in the upper right.
Click 'Create New Topic' to open the new topic creation dialog.
Enter a topic name value such as 'PetFoodBowl', and a short display name value such as 'Bowl'. The display name will be used as the prefix for SMS messages so it should be a short, descriptive identifier.
At this point your SNS topic has been created successfully. You will want to take note of these two values:
  • Topic ARN - This ARN value uniquely identifies the SNS notification topic and will be used in the pet food bowl sketch configuration.
  • Region - The region identifies where the SNS notification topic was created. This value will be used in the pet food bowl sketch configuration.
Next click 'Create Subscription' to create a new subscription to this SNS topic. Subscriptions can be of various types, like SMS messages, email notifications, HTTP service calls, or more. You can have multiple subscriptions to a single topic, for example both an SMS subscription and an email subscription.

Set up whatever subscription you prefer for this project. Note that each subscription has to be validated by replying to an email/SMS message.
With the steps above complete, you should have a topic created in SNS and at least one subscriber to that topic. If you wish to add, remove, or update subscriptions you can navigate to the SNS management console with the steps above and adjust the subscribers for the topic.

Continue on to learn about the software used in this project.
This guide was first published on Dec 09, 2013. It was last updated on Dec 09, 2013. This page (Amazon SNS Setup) was last updated on Apr 22, 2019.