-
-
Save Andrei-Pozolotin/b0fdb0eea399d2cb33ea67f8247ae60f to your computer and use it in GitHub Desktop.
Get a list of AMI IDs for a specific Ubuntu version
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
#/bin/sh | |
curl https://cloud-images.ubuntu.com/locator/ec2/releasesTable | jsonlint -Sf | jq '[.aaData[]|select(.[1]=="trusty" and .[3]=="amd64" and .[4]=="hvm:instance-store")|{region:.[0], ami_id:(.[6]|sub("<a [^<]+>"; "")|sub("</a>"; ""))}]' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment