Skip to content
All gists
Back to GitHub
Sign in
Sign up
Sign in
Sign up
{{ message }}
Instantly share code, notes, and snippets.
sansagara
/
aws-add-tags-kinesis-stream.sh
Last active
Apr 12, 2020
Star
0
Fork
0
Star
Code
Revisions
2
Embed
What would you like to do?
Embed
Embed this gist in your website.
Share
Copy sharable link for this gist.
Clone via HTTPS
Clone with Git or checkout with SVN using the repository’s web address.
Learn more about clone URLs
Download ZIP
Adds a tag to all kinesis streams on the default region.
Raw
aws-add-tags-kinesis-stream.sh
#!
/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.
You signed in with another tab or window.
Reload
to refresh your session.
You signed out in another tab or window.
Reload
to refresh your session.