In this step you'll set up the table that will store temperature data in Amazon's DynamoDB service. Before you begin you'll want to 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.

Once you have an AWS account, the video below will show you how to setup the table:
Here's a summary of the steps shown in the video:
After creating an AWS account (and noting what your access key and secret access key values are as they will be used later in the configuration), navigate to and select the AWS management console link in the upper right corner.
Select the DynamoDB service.
Note in the upper right corner you can select the region where the table will be created. Pick a region that is near your location for the best performance, then click Create Table to open the table creation wizard.
Follow the wizard to create a table with the following attributes:
  • Name: Temperatures
  • Primary Key Type: Hash and Range
  • Hash Attribute Type: String
  • Hash Attribute Name: Id
  • Range Attribute Type: Number
  • Range Attribute Name: Date
  • No secondary indexes.
  • Default values for provisioned throughput capacity and throughput alarms
After finishing the table creation wizard, refresh the tables list until the new table has a status of 'ACTIVE'.

Also take note of the Amazon Resource Name (ARN) in the 'Details' tab for the table. This ARN value will be used later in the table setup.
Next you will setup a group and user with read only access to the table. This will allow you to access the table from a website without embedding your personal AWS access codes in the source (where they are visible to anyone who views the web page).

In the Services menu at the upper left, select the 'IAM' service.
Click 'Create a New Group of Users' to open the group and user creation wizard.
Set the group name to 'TemperatureReaders'.
Select the 'Policy Generator' option to set permissions.
Add a policy statement with the following attributes:
  • Effect: Allow
  • AWS Service: DynamoDB
  • Actions: GetItem, ListTables, Query, Scan
  • Amazon Resource Name (ARN): The ARN value for the table you created earlier.
Click continue to see a summary of the generated policy, then continue again to create a user.
In the 'Create New Users' tab, create a new user with name 'TemperatureReadUser'. Make sure the 'Generate an access key for each User' is selected, then click continue.

After reviewing the details, click continue again. When the user is created, open the 'Show User Security Credentials' drop down and take note of both the access key and secret access key values for this read only user.
Continue on to learn how to set up the sketch for the cloud thermometer.

This guide was first published on Nov 24, 2013. It was last updated on Nov 24, 2013.

This page (DynamoDB Table Setup) was last updated on Nov 21, 2013.

Text editor powered by tinymce.