Skip to content

DynamoDB Basics - Hands OnΒΆ

We can open up the DynamoDB service in AWS Console and create a new table.

At first we need to fill out the table name and a primary key (optionally the sort key as well).

Next, we can choose either the default settings or to customize them, like table class - standard or infrequent access.

Next, we have a capacity calculator, at which we will look into later.

Next, we can select the On-demand or Provisioned capacity mode. Note that the Provisioned is in the free-tier.

Next, we can set the read and write capacity. For free tier we can turn off the auto scaling and set both to 2 provisioned capacity units.

Next, we can set up the secondary indexes. We are going to look into that later.

Finally, we can set up the encryption.


Our table has now been created.

We can open it up and have a lot of information about it.

If we click on the View items, we can scan or query them.

We are going to create an item - there's a button for that.

It will open up a form where you can set the partition key and add additional fields. Optionally, you can choose to add the item in JSON format.

In DynamoDB it is fine that most of the columns are left empty, the only mandatory field is the primary key.


Next, we can set up another table UserPosts, where the primary key is the user_id and the sort key is post timestamp.