Created
August 10, 2016 15:40
-
-
Save ddgenome/0e57e325b7a13a7403f7c8f540e8a7a9 to your computer and use it in GitHub Desktop.
Get CoreOS AMI information from AWS
This file contains hidden or 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
#!/bin/bash | |
for c in stable beta alpha; do | |
for ra in $(curl -s "https://coreos.com/dist/aws/aws-$c.json" | jq --raw-output 'del(.release_info) | del(."us-gov-west-1") | map_values(.hvm) | to_entries | .[] | "\(.key):\(.value)"'); do | |
r=$(echo "$ra" | cut -d : -f 1) | |
a=$(echo "$ra" | cut -d : -f 2) | |
echo "$c $r $a" | |
aws --region "$r" ec2 describe-images --image-id "$a" | jq '.Images[].Name?' | |
done | |
done | |
exit 0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment