Amazon DynamoDB
Getting Started Guide (API Version 2012-08-10)


In this tutorial, you created the Movies table in DynamoDB on your computer and performed basic operations. The downloadable version of DynamoDB is useful during application development and testing. However, when you are ready to run your application in a production environment, you need to modify your code so that it uses the Amazon DynamoDB web service.

Using the Amazon DynamoDB Service

You need to change the endpoint in your application in order to use the Amazon DynamoDB service. To do this, find the following lines in the code:

$sdk = new Aws\Sdk([
    'endpoint'   => 'http://localhost:8000',
    'region'   => 'us-west-2',
    'version'  => 'latest'

Now remove the endpoint parameter so that the code looks like this:

$sdk = new Aws\Sdk([
    'region'   => 'us-west-2',
    'version'  => 'latest'

After you remove this line, your code can access the DynamoDB service in the region specified by the region config value. For example, the following line specifies that you want to use the US West (Oregon) region:

    'region'   => 'us-west-2',

Now, instead of using DynamoDB on your computer, the program uses the DynamoDB service endpoint in US West (Oregon).

Amazon DynamoDB is available in several regions worldwide. For the complete list of regions and endpoints, see Regions and Endpoints in the AWS General Reference. For more information, refer to the AWS SDK for Ruby Getting Started Guide.

The downloadable version of DynamoDB is for development and testing purposes only. By comparison, DynamoDB is a managed service with scalability, availability, and durability features that make it ideal for production usage. The following table contains some other key differences between DynamoDB running on your computer and the Amazon DynamoDB service:

 DynamoDB (downloadable version)Amazon DynamoDB (web service)
Creating a TableThe table is created immediately.Table creation takes some time, depending on its provisioned throughput settings. DynamoDB allocates sufficient resources to meet your specific read and write capacity requirements.
Provisioned ThroughputThe downloadable version of DynamoDB ignores provisioned throughput settings.Provisioned throughput is a fundamental concept in DynamoDB. The rate at which you can read and write data depends on your provisioned capacity settings. For more information, see Provisioned Throughput in the Amazon DynamoDB Developer Guide.
Reading and Writing DataReads and writes are performed as fast as possible, without any network overhead.Read and write activity is regulated by the provisioned throughput settings on the table. To increase the maximum throughput, you must increase the throughput settings on the table. Network latency also affects throughput to an extent.
Deleting a TableThe table is deleted immediately.Table deletion takes some time, as DynamoDB releases the resources that had been used by the table.

Next Steps

For more information about Amazon DynamoDB, see the Amazon DynamoDB Developer Guide. We recommend the following topics:

Data Model

Provisioned Throughput

Improving Data Access with Secondary Indexes

The Amazon DynamoDB Developer Guide also includes the following topics about working with tables, items, and queries:

Working with Tables

Working with Items

Query and Scan Operations in DynamoDB

Best Practices