dynobase-icon
Dynobase

Error: dynamodb cannot read property 's' of undefined

Rafal Wilinski

Answered by Rafal Wilinski

Last updated: October 23rd, 2026

Solution

A TypeError while reading S or s means the object being dereferenced is missing. With DynamoDB, check for an absent Item or attribute and confirm whether the client returns typed DynamoDB JSON or native values.

// Low-level GetItemCommand response:
const typedName = rawResponse.Item?.name?.S;

// DynamoDBDocumentClient GetCommand response:
const nativeName = documentResponse.Item?.name;

These snippets assume each response has already been awaited. The DynamoDB String type descriptor is uppercase S, not lowercase s. Document-client strings have no S wrapper. A Number uses N, so do not assume every attribute is a String.

GetItem omits Item when no record matches. ProjectionExpression can also omit name even when an item exists. Handle expected absence explicitly and validate required attributes. If decoding a stream record, check eventName and the configured view before reading NewImage or OldImage.

See typed versus native JSON 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.