Error: dynamodb put function not working

Answered by Rafal Wilinski
What's Causing This Error
This error mainly occurs with the AWS JavaScript SDK when the put() function is used as a promise-based function.
For example, suppose you are executing the put() in a Lambda function and do not wait for it to finish running. The Lambda function will immediately return a response, but the put() will not get executed.
Solution - Here's How To Resolve It
To resolve the error, use an async-await approach as shown below.
exports.handler = async (event) => {
const obj = {
pk: '1',
name: "Lakindu"
};
const response = {
statusCode: 200,
body: JSON.stringify(obj),
};
var params = {
'TableName':'test-table',
'Item': {
...obj
},
};
// await the promise and then await the result, so the function gets invoked.
await documentClient.put(params).promise();
return response;
};
Other Common DynamoDB Errors (with Solutions)
- dynamodb throughput error
- moto dynamodb not working
- a bytes-like object is required not binary dynamodb
- can't pickle thread.lock objects typeerror boto3 python dynamodb
- dynamodb is abstract cannot be instantiated
- dynamodb global secondary index does not project
- dynamodb streams missing events
- dynamodb could not load credentials from any providers
- localstack dynamodb not working
- DynamoDB stream lambda error
- error dynamodb streams must be enabled on the table
- dynamodb consistent reads are not supported on global secondary indexes
- dynamodb property projection cannot be empty
- DynamoDB BatchSave not working
- DynamoDB throttling error
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