Guest User

Untitled

a guest
Jan 24th, 2018
95
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.54 KB | None | 0 0
  1. const data = [
  2. {
  3. "value": "1",
  4. "_index": "index1",
  5. "_type": "type1"
  6. }];
  7.  
  8. const params = {
  9. DeliveryStreamName: 'XXX', /* required */
  10. Records: [/* required */
  11. {
  12. Data: JSON.stringify(data[0]) //new Buffer('...') || 'STRING_VALUE' /* Strings will be Base-64 encoded on your behalf */ /* required */
  13. }
  14. ]
  15. };
  16. firehose.putRecordBatch(params, (err, data) => {
  17. if (err) console.log(err, err.stack); // an error occurred
  18. else console.log(data); // successful response
  19. });
Add Comment
Please, Sign In to add comment