Created
April 30, 2016 21:17
-
-
Save marcelpanse/d190d8bc2db0659b31d0975d6aa48987 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
var docClient = new DOC.DynamoDB(); | |
var params = {}; | |
params.TableName = "accounts"; | |
params.Key = {accountId: event.accountId}; | |
params.AttributeUpdates = { | |
website: {PUT: "update", Value: event.website} | |
}; | |
docClient.updateItem(params, function (err, data) { | |
if (err) { | |
console.log(err, err.stack); | |
context.done("Error while creating account: " + err); | |
} else { | |
console.log("account updated", user.email); | |
context.done(null, {accountId: event.accountId}); | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment