A simple utility designed to mimic tail -f
for Kinesis streams.
mvn clean package
bash ./target/classes/build.sh
sudo cp ./target/stail /usr/local/bin # this step is optional
Usage: stail [options]
Options:
--duration
how long the stream should be tailed. eg: PT15M is 15mins
--json
enable json payload reformatting (single payload per line)
Default: false
--profile
AWS profile to use for credentials
--region
AWS region to find the stream in
Default: us-west-2
--role
role ARN to be assumed to connect to Kinesis
--start
time to start fetching records from relative to now. eg: PT15M is 15mins
ago
* --stream
Kinesis stream name to tail
stail --stream my-favourite-stream --region us-west-2 --profile dev | jq 'select(.type == "airplane")'
stail --stream my-favourite-stream --role arn:aws:iam::12345678912345:role/my-favourite-stream-readonly-role