dynobase-icon
Dynobase

Error: dynamodb does not accept empty set

Rafal Wilinski

Answered by Rafal Wilinski

Last updated: October 23rd, 2026

Solution

DynamoDB does not accept empty String, Number or Binary sets. Support for empty non-key strings and binary values did not remove the empty-set restriction.

  1. Inspect sets created from filtering or deduplicating input. A valid set can become empty before serialization.
  2. Omit the attribute on a new item, or REMOVE it with UpdateItem when the last member is removed.
  3. Use an empty List if ordered collection semantics fit the model. A List and a Set are different types.
  4. Use NULL only if that is the intended stored meaning; it is not an empty set.
import { DynamoDBClient } from "@aws-sdk/client-dynamodb";
import { DynamoDBDocumentClient, UpdateCommand } from "@aws-sdk/lib-dynamodb";

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

await db.send(new UpdateCommand({
  TableName: "Products",
  Key: { pk: "product-1" },
  UpdateExpression: "REMOVE #tags",
  ExpressionAttributeNames: { "#tags": "tags" },
}));

The v3 marshaller's convertEmptyValues option can turn an empty set into NULL. That changes the type and may break conditions expecting a set, so do not enable it as a blanket validation bypass. A nonempty set must contain values of one supported element type.

See sets and lists 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.