Last active
November 12, 2019 21:39
-
-
Save amcginlay/a958520ba1803feb49a6d6f2e84097ff to your computer and use it in GitHub Desktop.
AWS CLI command to dump the contents of a Kinesis stream shard
This file contains 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
STREAM_NAME=wildrydes | |
SHARD_ID=ShardId-000000000000 | |
aws kinesis get-records --shard-iterator $( \ | |
aws kinesis get-shard-iterator \ | |
--stream-name ${STREAM_NAME} \ | |
--shard-id ${SHARD_ID} \ | |
--shard-iterator-type TRIM_HORIZON \ | |
--output text \ | |
) --output text --query 'Records[*].[Data]' | while read line ; do echo $line | base64 --decode ; echo ; done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment