Question: How to handle empty strings in DynamoDB?

Answered by Rafal Wilinski
Answer
Since 2020, DynamoDB has supported empty string values for non-key attributes.
Before passing an empty string as a field value, you can set the configuration file IsEmptyStringValueEnabled = true
in DynamoDBContextConfig
class. Or, you can edit the AWS configuration as shown below.
const documentClient = new AWS.DynamoDB.DocumentClient({ convertEmptyValues: true });
You can refer to this documentation for more details.
Other Common DynamoDB FAQ (with Answers)
- Can we store list in DynamoDB?
- Should you make a new DynamoDB client for each request?
- Does DynamoDB have read replicas?
- Can we rename DynamoDB table?
- How to dump multiple DynamoDB tables?
- Can DynamoDB have null values?
- What are the differences between DynamoDB and MySQL?
- Does DynamoDB support atomic updates?
- Will I be charged for DynamoDB is it is inactive?
- How to store location coordinates in DynamoDB?
- Can Django use DynamoDB?
- Can DynamoDB trigger AWS Step Functions?
- How to access DynamoDB from EC2?
- Can QuickSight read DynamoDB?
- How to write a test case for mocking DynamoDB?
Spend less time in the AWS console, use Dynobase.
Try 7-day free trial. No strings attached.
Product Features
DynamoDB Tools
DynamoDB Info
© 2025 Dynobase