Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Adds a tag to all kinesis streams on the default region.
#!/bin/bash
# Adds a tag to all kinesis streams on the default region.
# depends on AWS CLI and JQ
TAG_KEY="Hello"
TAG_VALUE="World"
for amiId in `aws ec2 describe-images --region us-east-1 --owners self --output json --query 'Images' | jq '.[] | .ImageId' -r`; do
instances=$(aws ec2 describe-instances --region us-east-1 --filters "Name=image-id,Values=${amiId}")
echo ${amiId} '|' ${instances}
done
echo "Done"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.