diff --git a/packages/spacecat-shared-dynamo/src/index.js b/packages/spacecat-shared-dynamo/src/index.js index 51301776a..a4d32b3da 100644 --- a/packages/spacecat-shared-dynamo/src/index.js +++ b/packages/spacecat-shared-dynamo/src/index.js @@ -29,7 +29,12 @@ import removeItem from './modules/removeItem.js'; const createClient = ( log = console, dbClient = new DynamoDB(), - docClient = DynamoDBDocument.from(dbClient), + docClient = DynamoDBDocument.from(dbClient, { + marshallOptions: { + convertEmptyValues: true, + removeUndefinedValues: true, + }, + }), ) => ({ query: (params) => query(docClient, params, log), getItem: (tableName, key) => getItem(docClient, tableName, key, log),