Error: dynamodb does not accept empty set

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.
- Inspect sets created from filtering or deduplicating input. A valid set can become empty before serialization.
- Omit the attribute on a new item, or REMOVE it with UpdateItem when the last member is removed.
- Use an empty List if ordered collection semantics fit the model. A List and a Set are different types.
- 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.
Other Common DynamoDB Errors (with Solutions)
- accessdeniedexception dynamodb
- dynamodb the table does not have the specified index
- Float types are not supported. Use decimal types instead.
- DynamoDB parameter validation failed
- DynamoDB local error unable to access JAR file dynamodblocal.jar
- dynamodb converter not found for enhancedtype
- AWS DynamoDB errors ResourceNotFoundException
- dynamodb ttl not deleting / erasing items
- dynamodb system errors metric
- DynamoDB Internal Server Error
- failed to begin subsegment named 'amazondynamodbv2': segment cannot be found.
- dynamodb does not support null values
- can't pickle thread.lock objects typeerror boto3 python dynamodb
- dynamodb problem function call failed
- DynamoDB console unable to delete this item
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
DynamoDB Info
© 2026 Dynobase