AWS DynamoDB

Rajat Arora
3 min readNov 21, 2021

--

Dynamo DB — Amazon DynamoDB is a fully managed NoSQL database service that provides fast and predictable performance with seamless scalability. You can use Amazon DynamoDB to create a database table that can store and retrieve any amount of data, and serve any level of request traffic.

Amazon DynamoDB is a key-value and document database that delivers single-digit millisecond performance at any scale. It’s a fully managed, multi-region, multi-active, durable database with built-in security, backup and restore, and in-memory caching for internet-scale applications.

There are no schemas so every record can have a different structure. The only restriction is that the field(s) defined as the partition key must be present in all the records.

Based on this partition key, DynamoDB store data in different drives. An efficient distribution will make accessing the data as fast as possible, so it’s important to choose a good partition key.

This way, the partition key can become the primary key, but you can also use a combination of a partition key and a sort key as a primary key. For example, if you have multiple records with the same course ID (the partition key), you can add a timestamp as a sort key to form a unique combination. In addition, you can also have secondary indexes for any other field (or combination of fields) to make queries more efficient.

Make sure you’re in the correct AWS region (there’s a DynamoDB database per region) and click on Create table:

Enter the following information, leave the default settings checked and click on Create Table:

Table Name : tutorials

Primary Key : id

It might take a few seconds, but you should see a confirmation page like the following:

To add data in this Table you can go to Table details and then View Items, then click on Create Item button

On this screen you can enter the value for the id field and for rest of the data you can define the attributes at run time along with their values. As it’s a document type database you can provide any key value pair

--

--