dynobase-icon
Dynobase

Error: could not unmarshal the value dynamodb

Rafal Wilinski

Answered by Rafal Wilinski

Last updated: October 23rd, 2026

Solution

A failure to unmarshal a DynamoDB value means the decoder cannot map its input into the requested application representation. The exact cause depends on the SDK: check the failing field and nested exception rather than assuming all such errors are array problems.

import { unmarshall } from "@aws-sdk/util-dynamodb";

const response = { Items: [{ id: { S: "1" }, count: { N: "3" } }] };
const items = (response.Items ?? []).map(item => unmarshall(item));

In JavaScript v3, unmarshall accepts one attribute map, such as response.Item or a stream NewImage. It does not take the whole response or an array. Document-client output is already native data. Check that each typed value uses a valid S, N, M, L or other descriptor.

In typed clients, also check whether the destination property can represent the stored value. A String where the model expects a Number, a malformed custom-converter value, or an incompatible nested structure needs a model or data correction. Preserve the original error and a redacted example of the failing attribute for diagnosis.

See DynamoDB data types and AWS documentation.

Dynobase is a Professional GUI Client for DynamoDB

Start your 7-day free trial today

Product Features

Download
/
Changelog
/
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.