DEV Community 👩‍💻👨‍💻

Cover image for Cook a recipe with AWS: Dynamo DB Table
Nandini R for AWS Community Builders

Posted on

Cook a recipe with AWS: Dynamo DB Table

Image description


Amazon DynamoDB is a fully managed NoSQL database with which you can create database tables that can store and retrieve any amount of data and serve any level of request traffic.

DynamoDB is a schema-less database that requires only a table name and a primary key when you create the table.

Lets get started with DynamoDB and create a table to store the details of students


Log into AWS account with a valid user credentials
(Root user not preferred)

Lets Jump to the Recipe now

Steps to create

  • Open the DynamoDB from the aws console

Image description

  • Click on the create table button

Image description

Remember, DynamoDB is a schema-less database that requires only a table name and a primary key when you create the table.

  • Specify the table name, My table name is going to be student_table since student details are being stored
  • Now,Lets Specify the Partition key. I am going to add Student_Id as the partition key.

  • Select the data type as Number

The partition key is part of the table's primary key which is a hash value that is used to retrieve items from your table and allocate data across hosts for scalability and availability.

We can also specify the sort key for the table but its optional

The sort key allows you to sort or search among all items sharing the same partition key.

Image description

Now, Scroll down and Make sure the Default Settings is selected for the Table settings

Image description

  • Click Create table button

Image description

You can see the status as "Creating".

Image description

Now lets wait for couple of minutes to get the status changed to Active

Image description

Once the table status changed to Active
click on the table name link and you will be navigated to the table page.

Image description
Lets add some items Student details to the table

  • Click on Actions Button
  • Select Create Item

Image description

Lets add the below students to the table

Studentid: 101
Name: Jade

Name is the additional attribute where as studentid is the partionkey attribute

Specify the value of partition key and click on Add new Attribute button to add the Name attribute. Select String Type

Image description

Change the attribute name to Student_Name
Specify the value as "Jade"

Image description

This is the Form View, You can click the JSON View button to see the json version

Image description

  • Click Create item

Image description

  • You can see item getting added to the table

Image description

Top comments (1)

vijay_21 profile image
Vijay Ramanathan

Good Recipe

Classic DEV post:

CLI tools you won't be able to live without 🔧

CLI tools