0.1.0 • Published 4 years ago

kinesis-get-records-cli v0.1.0

Weekly downloads
-
License
UNLICENSED
Repository
-
Last release
4 years ago

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