dynobase-icon
Dynobase

Error: missing required key 'key' in params dynamodb

Rafal Wilinski

Answered by Rafal Wilinski

Last updated: October 23rd, 2026

Solution

Missing required key 'Key' in params means the request lacks the capitalized Key parameter required by GetItem, UpdateItem or DeleteItem. Supplying a field named key, or putting the identifier only inside Item, does not satisfy it.

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);

This table has a partition key and a sort key. Use the actual key names from DescribeTable and omit sk only if your table has no sort key. Make sure Key is not undefined after request construction or destructuring. A PutItem operation takes Item instead; Query uses a key condition rather than Key.

The original wording commonly appears in SDK v2 validation. The example uses SDK v3 and native values. Low-level GetItemCommand requires AttributeValue wrappers, while GetCommand does not.

See primary keys 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.