Skip to content

Instantly share code, notes, and snippets.

@rhossi
Created August 19, 2015 12:46
Show Gist options
  • Save rhossi/031c8d501ef95fb0cd82 to your computer and use it in GitHub Desktop.
Save rhossi/031c8d501ef95fb0cd82 to your computer and use it in GitHub Desktop.
var AWS = require('aws-sdk');
var dynamodb = new AWS.DynamoDB({apiVersion: '2012-08-10', region: 'us-east-1'});
var params = {
TableName: 'Produtos',
ExpressionAttributeValues: {
':id' : { 'S' : '1' }
},
KeyConditionExpression: 'Id = :id'
};
dynamodb.query(params, function(err, data) {
if (err) console.log(err);
else console.log(data);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment