dynobase-icon
Dynobase

Error: aws.dynamodb.converter.unmarshall not working

Rafal Wilinski

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.

Dynobase is a Professional GUI Client for DynamoDB

Start your 7-day free trial today

Product Features

Download
/
Pricing
/
Member Portal
/
Privacy
/
EULA
/
Twitter
© 2026 Dynobase
+
Still using AWS DynamoDB Console?
Try Dynobase to accelerate your DynamoDB workflow. Start your 7-day free trial today.