DynamoDB: Delete Table (Guide w/ Code Examples)

Provided by Rafal Wilinski
To delete a DynamoDB table using the JavaScript SDK, you can use the deleteTable method. The below example shows how to use this method to delete a table.
However, it will only delete the table if it already exists and no longer has any items or if you set the skip_table_deletion flag to true. Also, the table must be in the ACTIVE state.
const AWS = require('aws-sdk'); const dynamodb = new AWS.DynamoDB(); const params = { TableName: 'myTable' }; dynamodb.deleteTable(params, (err, data) => { if (err) { console.error("Unable to delete table. Error JSON:", JSON.stringify(err, null, 2)); } else { console.log("Deleted table. Table description JSON:", JSON.stringify(data, null, 2)); } });
Similar Code Examples
- DynamoDB: Get Last Inserted Item
- DynamoDB: Query Ends With
- DynamoDB: Query Greater Than
- DynamoDB BatchWriteItem in Typescript
- DynamoDB: Like
- DynamoDB: Delete All Items With Partition Key
- DynamoDB: Get Last 10 Records
- DynamoDB Get in Typescript
- DynamoDB: Get Unique Values
- DynamoDB: Get Multiple Items
- DynamoDB: Query JSON
- DynamoDB: Batch Get
- DynamoDB: Query Count
- DynamoDB: Not Begins With
- DynamoDB: Get By ID
Dynobase is a Professional GUI Client for DynamoDB
Start your 7-day free trial today
Product Features
- New in Dynobase 3.0
- Semantic and Vector Search
- Schema Explorer
- Visual JSON Path Filtering
- Visual Item Diff
- MCP Server for AI Tools
- Use SQL with DynamoDB
- Import CSV To DynamoDB
- Import JSON To DynamoDB
- Export DynamoDB To JSON
- Export DynamoDB To S3
- Export DynamoDB To CSV
- DynamoDB Update Item
- DynamoDB Delete All Items
- DynamoDB Delete Item
- DynamoDB Create Table
- DynamoDB Delete Table
- DynamoDB Conditional Update
DynamoDB Tools
DynamoDB Info
© 2026 Dynobase