DynamoDB is a NoSQL type of database. It is very important to learn the difference before migrating an existing system or choosing DynamoDB for your new project. This article assumes you have that foundation and seeks to provide a quick overview of how to get DynamoDB running on your local machine so that you can prototype or test or just explore things locally.
java -Djava.library.path-./DynamoDBLocal_lib -jar DynamoDBLocal.jar -SharedDb
Now, DynamoDB should be up and running on port 8000. In order to test that, we can
list the current tables in your local DynamoDB with the following command from a new
aws dynamodb list-tables --endpoint-url http://localhost:8000.
This should return an empty list because you have not yet created a table.
With a relational database, you would usually have to know a little more about the kinds of data you would be storing; however, with DynamoDB there are three pieces of information needed to get a table created. You need a name, a primary key, and the throughput, or Read Capacity Units and Write Capacity Units.
Let's create a table. At the command line, type:
aws dynamodb create-table \
--table-name SomeName \
Once you have created this table, you can check the create with the
list-tables command again. And never forget