Created
April 23, 2020 19:00
-
-
Save digitalbase/9da93be2e1060641e95752ef59a5a506 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const AWS = require('aws-sdk'); | |
const { DocumentClient } = require('aws-sdk/clients/dynamodb'); | |
module.exports = () => { | |
return new DocumentClient( { | |
// ensures empty values (userId = null) are converted | |
// more @ https://stackoverflow.com/questions/37479586/nodejs-with-dynamodb-throws-error-attributevalue-may-not-contain-an-empty-strin | |
convertEmptyValues: true | |
}); | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment