Advertisement
Guest User

Untitled

a guest
Jun 20th, 2019
221
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.95 KB | None | 0 0
  1. var AWS = require("aws-sdk");
  2. var dynamoDB = new AWS.DynamoDB.DocumentClient();
  3.  
  4. let params = {
  5. RequestItems: {
  6. "db-test": [
  7. {
  8. PutRequest: {
  9. Item: {
  10. R_TIMESTAMP: 'STRING_VALUE1' ,
  11. R_ID: 'STRING_VALUE1'
  12. }
  13. }
  14. },
  15. {
  16. PutRequest: {
  17. Item: {
  18. R_TIMESTAMP: 'STRING_VALUE2' ,
  19. R_ID: 'STRING_VALUE2'
  20. }
  21. }
  22. }
  23. ]
  24. }
  25. };
  26.  
  27. dynamoDB.batchWrite(params, function(err, data) {
  28. if (err) {
  29. console.log("Error", err);
  30. } else {
  31. console.log("Success", data);
  32. }
  33. })
  34.  
  35. Error { ValidationException: The provided key element does not match the schema
  36. at Request.extractError (/var/runtime/node_modules/aws-sdk/lib/protocol/json.js:51:27)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement