Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- const data = [
- {
- "value": "1",
- "_index": "index1",
- "_type": "type1"
- }];
- const params = {
- DeliveryStreamName: 'XXX', /* required */
- Records: [/* required */
- {
- Data: JSON.stringify(data[0]) //new Buffer('...') || 'STRING_VALUE' /* Strings will be Base-64 encoded on your behalf */ /* required */
- }
- ]
- };
- firehose.putRecordBatch(params, (err, data) => {
- if (err) console.log(err, err.stack); // an error occurred
- else console.log(data); // successful response
- });
Add Comment
Please, Sign In to add comment