Monday 15 September 2014

node.js - AWS SDK Working with DynamoDB and putItem won't allow me to insert without updating -



node.js - AWS SDK Working with DynamoDB and putItem won't allow me to insert without updating -

here how inserting item database:

dynamodb.putitemasync({ "tablename": tblname, "item": { "userid": { "s": string(obj.user_id) }, "campaignid": { "n": string(obj.campaign_id) }, "email": { "s": string(obj.email) }, "customactivitynodeid": { "n": string(obj.custom_activity_node_id) } }, "expected": { "userid": { "exists": false } } })

the putitemasync phone call because promisified library bluebird. tried doing this:

{ "expected": { "userid": { "exists": false } } }

with putitem call, having no luck. want insert records without existing ones updating

node.js amazon-web-services aws-sdk

No comments:

Post a Comment