Amazon DynamoDB is a key-value and document database. It's a fully managed, multi-region, multi-master, durable database and can handle more than 10 trillion requests per day. It has built-in security, backup and restore, and in-memory caching for internet-scale applications. We can build applications with virtually unlimited throughput and storage.
For use cases that require even faster access with microsecond latency, DynamoDB Accelerator provides a fully managed in-memory cache. It is serverless with no servers to provision, patch, or manage and no software to install, maintain, or operate. It provides both provisioned and on-demand capacity modes. It encrypts all data by default.
In this context, we shall look into how to create a simple DynamoDB Table with On-Demand mode and create a few items and perform a search on it.
To know about DynamoDB and its pricing, click here.
1. Create AWS Account
Click here to create a free AWS account
2. Login to AWS
Now, go to the AWS Login page:
Once opened, you can login using the login details.
Once we login into AWS successfully, we will see the main console with all the services listed.
3. Create a DynamoDB Table
To create a DynamoDB Table, click on Services at the top left of the screen and search for DynamoDB.
You will see the homepage of Amazon DynamoDB. To create a table click on" Create table".
In the Table Name box type in the table name and specify the Partition key in the box. Untick the "Use default settings" check box.
Select the "On-Demand" option. Scroll down and click on the create table button. Your table will be created.
4. Add items in the Table and search for a record
To add data to your table, select the table we just created.
Select the Items tab. On the Items tab, choose to Create item.
In the data entry window, type the name that you want to add to the table as an item. Repeat the same step to add multiple entries or items.
To search for a particular item, in the filter add "Name" and specify the name that you want to search.
Change the other value, you will find the data you are looking for if it matches the query.
You can easily delete a table from the DynamoDB console if you no longer need it. It is always a good idea to delete the resources if they are not needed.
To delete the table, select the table we just created and click on the "Delete Table" button.
In the confirmation dialog box, type Delete.