Ruby and DynamoDB
In this tutorial, you use the AWS SDK for Ruby to write simple programs to perform the following Amazon DynamoDB operations:
Create a table called
Moviesand load sample data in JSON format.
Perform create, read, update, and delete operations on the table.
Run simple queries.
You use the downloadable version of DynamoDB in this tutorial. In the Summary, we explain how to run the same code against the DynamoDB service.
Before you begin this tutorial, you need to do the following:
Download and run DynamoDB on your computer. For more information, see Download and Run DynamoDB.
Sign up for Amazon Web Services and create access keys. You need these credentials to use AWS SDKs. To create an AWS account, go to http://aws.amazon.com/, choose Create an AWS Account, and then follow the online instructions.
Create an AWS credentials file. For more information, see Configuration in the AWS SDK for Ruby API Reference.
Set up the AWS SDK for Ruby as follows:
Go to https://www.ruby-lang.org/en/documentation/installation/ and install Ruby.
Go to http://aws.amazon.com/sdk-for-ruby and install the AWS SDK for Ruby.
For more information, see Installation in the AWS SDK for Ruby API Reference.
We also recommend that you review DynamoDB concepts. For more information, see Introduction to DynamoDB Concepts.