Last active

Short example of node.js Express method to POST resource data into DynamoDB. This was just a snippet for my blog to illustrate the type of transformation DynamoDB requires. Assume the data has already been validated, and DynamoDB connection established.

  • Download Gist
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 (req, res) ->
params =
TableName: 'TableName'
S: req.body.color
SS: req.body.tags
N: req.body.count
ddb.client.putItem params, (error, data) ->
if !error?
res.end 201

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.