dynobase-icon
Dynobase

Error: aws.dynamodb.documentclient is not a constructor

Rafal Wilinski

Answered by Rafal Wilinski

Last updated: October 23rd, 2026

Solution

DocumentClient is not a constructor usually means the imported value is not the constructor expected by the code. Common causes are incorrect capitalization, mixing SDK v2 and v3 APIs, or a mock that replaced the export.

import { DynamoDBClient } from "@aws-sdk/client-dynamodb";
import { DynamoDBDocumentClient } from "@aws-sdk/lib-dynamodb";

const db = DynamoDBDocumentClient.from(new DynamoDBClient({}));

Use the @aws-sdk/client-dynamodb and @aws-sdk/lib-dynamodb dependencies for this v3 code. It does not use AWS.DynamoDB.DocumentClient. In legacy v2 code that name is case-sensitive; aws.dynamodb.documentclient is not equivalent.

Check the actual import and installed package with npm ls. Very old v2 versions may lack DocumentClient, but upgrading to unsupported v2 is not the current migration path. Keep the lockfile and fix the dependency or import deliberately. In tests, verify that a module mock exposes the API your code calls.

See current client setup 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.