Skip to content

justinwalz/kinesis-get-records-cli

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

kinesis-cli

npm version

This CLI outputs newline separated records from kinesis. Written while developing another application as there did not seem to be a great way to simply dump records from all shards of a stream.

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

About

A simple CLI to dump kinesis records to the console

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published