Error: could not unmarshal the value dynamodb

Answered by Rafal Wilinski
What's Causing This Error
The DynamoDB unmarshal function can only accept an object (with data the structure of DynamoDB). Therefore, if you try to pass an array of these objects into the unmarshal function, it will throw an error.
Solution: Here's How To Resolve It
To resolve the error, iterate through the array of DynamoDB objects and "unmarshall" each object individually, as shown below.
const items = [
{
uId: { S: '123456789' },
date: { S: '09-06-2022' }
}
];
const unmarshalled = items.map((i) => aws.dynamodb.converter.unmarshall(i));
Other Common DynamoDB Errors (with Solutions)
- localstack dynamodb not working
- dynamodb unable to parse base64 string
- dynamodb global secondary index not working
- dynamodb query is null
- dynamodb stream missing fields
- DynamoDB No Regionendpoint Or Serviceurl Configured
- dynamodb condition does not exist
- DynamoDB GetItem no item
- dynamodb ttl not deleting / erasing items
- dynamodb global secondary index does not project
- dynamodb cannot convert undefined to object
- failed to list tables not authorized dynamodb
- DynamoDB Item Does Not Exist
- ConfigError: Missing region in config
- DynamoDB parameter validation failed
Spend less time in the AWS console, use Dynobase.
Try 7-day free trial. No credit card needed.
Product Features
DynamoDB Tools
DynamoDB Info
© 2026 Dynobase