Skip to content

Instantly share code, notes, and snippets.

@marcelpanse
Created April 30, 2016 21:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save marcelpanse/d190d8bc2db0659b31d0975d6aa48987 to your computer and use it in GitHub Desktop.
Save marcelpanse/d190d8bc2db0659b31d0975d6aa48987 to your computer and use it in GitHub Desktop.
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