dynobase-icon
Dynobase

Error: DynamoDB string set may not be empty

Rafal Wilinski

Answered by Rafal Wilinski

Last updated: October 23rd, 2026

Solution

“String set may not be empty” means a set with no members reached the serializer or service. A String Set is different from an empty String or an empty List, both of which can be valid non-key values. Fix the collection representation before sending it.

To clear an existing set without replacing the item, remove the attribute:

import boto3

table = boto3.resource("dynamodb", region_name="us-east-1").Table("Orders")
table.update_item(
    Key={"id": "123"},
    UpdateExpression="REMOVE #tags",
    ConditionExpression="attribute_exists(#id)",
    ExpressionAttributeNames={"#tags": "tags", "#id": "id"},
)

The condition prevents this cleanup from creating a new item at an absent key. If an explicit empty collection must remain present, store a List and update readers to expect it. For new items, omit optional empty sets. Check nested values too; neither adding a placeholder member nor changing IAM permissions addresses the data-model problem.

See collection types 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.