Last active
August 11, 2016 15:30
-
-
Save divideby0/25362ed0f8c6771f33ea41103138cf43 to your computer and use it in GitHub Desktop.
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
REGION=${REGION:-us-east-1} | |
UBUNTU_RELEASE=${UBUNTU_RELEASE:-trusty} | |
ARCH=${ARCH:-amd64} | |
INSTANCE_TYPE=${INSTANCE_TYPE:-hvm:ebs} | |
curl 'https://cloud-images.ubuntu.com/locator/ec2/releasesTable' --compressed | grep -Ei "\"$REGION\",\"$UBUNTU_RELEASE\",.*,\"$INSTANCE_TYPE\"" | grep -oEi "ami-\w+" | head -1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment