DynamoDB: Delete (Guide w/ Code Examples)

Provided by Rafal Wilinski
To delete an item from a DynamoDB table, you can use the delete
method of the DynamoDB DocumentClient
.
const AWS = require('aws-sdk'); const dynamoDb = new AWS.DynamoDB.DocumentClient(); const tableName = 'myTable'; const key = { id: '123' }; const params = { TableName: tableName, Key: key, }; dynamoDb.delete(params).promise() .then(() => { console.log(Item with id ${key.id} deleted successfully ); }) .catch(err => { console.error(err); });
Similar Code Examples
- DynamoDB: Bulk Insert
- DynamoDB: Batch Get
- DynamoDB: Query Count
- DynamoDB: Get Multiple Items
- DynamoDB: Get By ID
- DynamoDB: Delete Table
- DynamoDB: Not Between
- DynamoDB: Query Greater Than
- DynamoDB: GetItem
- DynamoDB: Query KeyConditionExpression
- DynamoDB: Get Last Inserted Item
- DynamoDB: Create if Not Exists
- DynamoDB: Get Unique Values
- DynamoDB: BatchGetItem
- DynamoDB: Query Date Range
Dynobase is a Professional GUI Client for DynamoDB
First 7 days are. No credit card needed.
Product Features
DynamoDB Tools
DynamoDB Info
© 2025 Dynobase