Open In App

Delete Table In DynamoDB

Last Updated : 13 Feb, 2024
Improve
Improve
Like Article
Like
Save
Share
Report

DynamoDB allows users to create databases capable of storing and retrieving any amount of data and comes in handy while serving any amount of traffic. It dynamically manages each customer’s request and provides high performance by automatically distributing data and traffic over servers. It is a fully managed NoSQL database service that is fast, predictable in terms of performance, and seamlessly scalable. It relieves the user from the administrative burdens of operating and scaling a distributed database as the user doesn’t have to worry about hardware provisioning, patching Software, or cluster scaling.

Provisioned Throughput

Provisioned Throughput refers to the capacity that you specify for a table to handle read and write operations. While creating the table you can specify the Write Capacity Units(WCU) and Read Capacity Units(RCU). An RCU represents one strongly consistent read per second for items up to 4 KB in size. If your items are larger than 4 KB, the required RCUs increase accordingly.

A WCU represents one write per second for items up to 1 KB in size. Larger items will require more WCUs.

Data Backups

DynamoDB supports Data Backups and Restore mechanisms. There are 2 Backups and restore mechanisms. They are

  • On-Demand Backup and Point In Time recovery (PITR)
  • Continuous and Periodic Backups

With On-Demand Backup, you can create full backups of your DynamoDB tables at any time. These backups are stored in Amazon S3, providing durability and the ability to restore data even if the original table is deleted. Point-in-Time Recovery allows you to restore your DynamoDB table to any specific point in time during the retention period. DynamoDB continuously backs up your data and enables you to recover to any second within a rolling 35-day window.

Continuous backups are designed to automatically back up your entire DynamoDB table data and settings. Periodic backups are manually triggered backups that you create at specific points in time.

Why Delete a Table in DynamoDB?

There are multiple things why you should delete a table.

  • In the case of Testing and development, you will create test tables. you can delete them to avoid unnecessary costs and resources.
  • In the case of Cost Management, DynamoDB charges are based on provisioned throughput and storage. If you have a table that is no longer needed and you want to save costs, you may choose to delete the table.
  • If you want to data cleanup or reset the data, then you need to delete a table.

How to Delete Table in DynamoDB

Below are the Steps to Delete AWS DynamoDB Table

In this article we will look into the process of Deleting a table in AWS DynamoDB. To Delete a table follow these steps:

Step 1: Login to your AWS account and then you will see this screen. Select All services.

Login to your AWS account

Step 2: In the services list, Choose DynamoDB.

Choose DynamoDB

Services

Step 3: Click Tables in the left side panel.

Click Tables in the left side panel

Choose Tables

Step 4: Choose the Table you want to delete from the list of tables, as shown below.

Choose the Table you want to delete from the list

Step 5: Click Delete on the top right corner and then confirm.

Click Delete on the top right corner

Click Delete

Step 6: Type confirm in the box.

Type confirm in the box

You have successfully deleted a table in DynamoDB.

Delete Table in DynamoDB – FAQ’s

What happens when I delete a table in DynamoDB?

When you delete a table in DynamoDB, the table and all of its data are permanently removed. The table name becomes available for reuse, and all associated provisioned throughput settings, secondary indexes, and configuration details are deleted.

Can I recover data after deleting a table?

No, once a table is deleted, the data is permanently lost. It’s essential to have backups or other data retention strategies in place before deleting a table if you need to preserve the data.

Can I reuse the name of a deleted table?

Yes, once a table is deleted, its name will becomes available for reuse.

How I can delete multiple items from DynamoDB table?

You can use DeleteItem to remove a single item from the table and if you want to remove multiple items, you can use BatchWriteItem. BatchWriteItem can also be used to target one or more DynamoDB tables that have a same API call.



Like Article
Suggest improvement
Share your thoughts in the comments

Similar Reads