Error: dynamodb getItem() is not a function

Answered by Rafal Wilinski
Last updated: October 23rd, 2026
Solution
getItem is not a function is a JavaScript API mismatch, not a missing DynamoDB permission. In SDK v2 the low-level client had getItem and DocumentClient had get; v3 command-based clients use send.
import { DynamoDBClient } from "@aws-sdk/client-dynamodb";
import { DynamoDBDocumentClient, GetCommand } from "@aws-sdk/lib-dynamodb";
const db = DynamoDBDocumentClient.from(new DynamoDBClient({}));
const { Item } = await db.send(new GetCommand({
TableName: "Orders",
Key: { pk: "CUSTOMER#123", sk: "ORDER#42" },
}));
console.log(Item);Install @aws-sdk/client-dynamodb and @aws-sdk/lib-dynamodb for this example. For a low-level v3 client, import GetItemCommand from client-dynamodb and supply typed values such as { S: "CUSTOMER#123" }. Do not append .promise() to v3 send calls.
Check that the variable is a client instance rather than an imported module, configuration object or mock. JavaScript is case-sensitive. If a wrapper intentionally exposes getItem, verify its initialization and API separately.
See JavaScript examples and AWS documentation.
Other Common DynamoDB Errors (with Solutions)
- dynamodb global secondary index not working
- com amazonaws services dynamodbv2 model resourcenotfoundexception
- dynamodb cannot read property '0' of undefined
- DynamoDB console unable to delete this item
- sls dynamodb install not working
- missing required key 'key' in params dynamodb
- DynamoDB stream lambda error
- AWS Lambda DynamoDB Stream Error
- dynamodb item size limit error
- dynamodb unable to locate credentials
- dynamodb could not connect to the endpoint url
- DynamoDB validation error
- DynamoDB Error All Attributes Must Be Indexed
- moto dynamodb not working
- DynamoDB Not Supported Requires @DynamoDBTyped Or @DynamoDBTypeConverted
Dynobase is a Professional GUI Client for DynamoDB
Start your 7-day free trial today
Product Features
DynamoDB Tools
- SSH GUI Client
- Chat With Cloud
- MongoDB GUI Client
- AWS Cost Monitoring
- DynamoDB Query Builder
- DynamoDB Code Examples
- DynamoDB Node.js Queries
- DynamoDB JSON Converter
- DynamoDB UUID Generator
- DynamoDB Local Admin GUI
- DynamoDB Pricing Calculator
- DynamoDB Single-Table Design
- Best DynamoDB GUI Clients
- Dynobase vs DynoTable