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)
- DynamoDB type is not supported
- DynamoDB Item Does Not Exist
- dynamodb cannot assign requested address
- requested resource not found aws dynamodb
- DynamoDB Auto Scaling Not Working
- DynamoDB Invalid UpdateExpression Syntax Error Token
- dynamodb cannot read property 's' of undefined
- Conditional Update Error DynamoDB
- name key is not defined dynamodb
- aws.dynamodb.converter.unmarshall not working
- ExpressionAttributeValues contains invalid value: One or more parameter values were invalid: An AttributeValue may not contain an empty string
- dynamodb cannot read property 'push' of undefined
- DynamoDB Network Error: self signed certificate in chain
- dynamodb item size limit error
- dynamodb trigger no records processed
Tired of switching accounts and regions? Use Dynobase.
Try 7-day free trial. No credit card needed.
Product Features
DynamoDB Tools
DynamoDB Info
© 2025 Dynobase