Error: aws.dynamodb.converter.unmarshall not working

Answered by Rafal Wilinski
Last updated: October 23rd, 2026
Solution
unmarshall fails or produces unexpected results when given an array, an entire SDK response, or data already converted to native JavaScript values. Pass one low-level item map at a time.
import { unmarshall } from "@aws-sdk/util-dynamodb";
const rawItems = [
{ uId: { S: "123456789" }, date: { S: "2026-10-23" } },
];
const items = rawItems.map(item => unmarshall(item));
console.log(items);For GetItemCommand, convert response.Item only if it exists. For QueryCommand from the low-level client, map over response.Items ?? []. A stream's NewImage is also an attribute map, but REMOVE events do not have one.
The older API was AWS.DynamoDB.Converter.unmarshall, with that capitalization. In v3, import unmarshall from util-dynamodb. Results from DynamoDBDocumentClient are already converted; unmarshalling them again is incorrect. Use wrapNumbers: true when you need to preserve number strings rather than converting them to JavaScript Number values.
See JSON conversion and AWS documentation.
Other Common DynamoDB Errors (with Solutions)
- dynamodb the parameter cannot be converted to a numeric value
- dynamodb global secondary index not working
- dynamodb cannot read property 'push' of undefined
- dynamodb consistent reads are not supported on global secondary indexes
- is not authorized to perform dynamodb:* on resource
- DynamoDB ConditionalCheckFailedException
- dynamodb query is not null
- dynamodb problem function call failed
- DynamoDB Is Not Null
- dynamodb atomic counter not working
- DynamoDB Not Supported Requires @DynamoDBTyped Or @DynamoDBTypeConverted
- ConfigError: Missing region in config
- error retrieving dynamodb table item serializationexception
- DynamoDB consistent read not working
- DynamoDB string set may not be empty
Dynobase is a Professional GUI Client for DynamoDB
Start your 7-day free trial today