Advertisement
Guest User

Untitled

a guest
Jul 27th, 2017
49
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.44 KB | None | 0 0
  1. const primaryKey = "4234241";
  2. const tableSpec = {
  3. TableName: 'tableName',
  4. Item: params,
  5. ConditionExpression: '#primaryId <> :primaryId',
  6. ExpressionAttributeNames: {'#primaryId': 'primaryId'},
  7. ExpressionAttributeValues: {
  8. ':primaryValue': primaryValue
  9. }
  10. };
  11. var docClient = new AWS.DynamoDB.DocumentClient();
  12. docClient.put(tableSpec, function (err, data) {
  13. if (err) {
  14. console.log(err);
  15. }
  16. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement