0.1.0 • Published 6 years agoCLI
kinesis-get-records-cli
Licence
UNLICENSED
Version
0.1.0
Deps
7
Size
14 kB
Vulns
1
Weekly
0
kinesis-cli
This CLI outputs newline separated records from kinesis.
Install
npm i -g kinesis-get-records-cli
Usage
To fetch the latest records:
kinesis-get-records --stream-name <StreamName> --shard-iterator-type <ShardIteratorType>
kinesis-get-records --region us-east-1 -s my-stream -i LATEST
If records are JSON objects, consider piping into jq
Example
Put records using the AWS CLI:
aws --region <AWSRegion> kinesis put-records --records Data=\'{\"key\":\"blob-$(date --iso-8601=seconds)\"}\',PartitionKey=foo --stream-name <StreamName>
Output
{"key":"blob-2020-03-18T07:22:29-07:00"}
{"key":"blob-2020-03-18T07:22:31-07:00"}
Build
npm run transpile
Run
node lib --region <AWSRegion> -s <StreamName> -i LATEST