Created
September 21, 2018 07:30
-
-
Save paulvictor/dfc4b535caff336f9b7e16185438ef28 to your computer and use it in GitHub Desktop.
Stream From Kinesis
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var AWS = require("aws-sdk") | |
| var options = | |
| { endPoint: "https://kinesis.ap-southeast-1.amazonaws.com" | |
| , accessKeyId: "" | |
| , secretAccessKey: "" | |
| , region: "ap-southeast-1" | |
| } | |
| var request4 = new AWS.Kinesis(options).subscribeToShard( | |
| { "ConsumerARN": "" | |
| , "ShardId": "shardId-" | |
| , "StartingPosition": {Type: "LATEST"} | |
| }) | |
| request4. | |
| on('httpHeaders', function(st, headers, resp, statusMsg){ | |
| console.log(st); | |
| console.log(headers); | |
| }). | |
| on('httpData', function(chunk, response){ | |
| console.log("-----------------------------------------------------------") | |
| console.log(chunk.toString('ascii')); | |
| }). | |
| send(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment