Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
List AWS Kinesis streams along with tags
#!/bin/bash
# lists all Kinesis streams along with their tags in the following format:
# stream_name | { tag_name: tag_value }
# depends on AWS CLI and JQ
for stream in `aws kinesis list-streams | jq .StreamNames[] -r`; do
tags=$(aws kinesis list-tags-for-stream --stream-name ${stream} | jq -c '.[][] | {(.Key): .Value}' | tr '\n' '\t')
echo ${stream} '|' ${tags}
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment