Created
July 9, 2015 19:05
-
-
Save jmoberly/e2688bf65479a7152942 to your computer and use it in GitHub Desktop.
Getting ID for latest Ubuntu AMI
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
ubuimagejson=$(curl 'https://cloud-images.ubuntu.com/releases/streams/v1/com.ubuntu.cloud:released:aws.json') | |
ubuversion=$(echo $ubuimagejson | jq -S '.products | ."com.ubuntu.cloud:server:14.04:amd64" | .versions | keys | .[length-1]') | |
echo $ubuimagejson | jq -S ".products | .\"com.ubuntu.cloud:server:14.04:amd64\" | .versions.${ubuversion}.items.usee1hs.id" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment