Skip to content

Instantly share code, notes, and snippets.

@marvinpinto
Last active January 31, 2016 21:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save marvinpinto/8d4d892df67d6e4ee332 to your computer and use it in GitHub Desktop.
Save marvinpinto/8d4d892df67d6e4ee332 to your computer and use it in GitHub Desktop.
Query to return the 5 newest released Ubuntu AMI IDs
sstream-query --output-format "%(version_name)s %(region)s %(id)s %(pubname)s" \
http://cloud-images.ubuntu.com/releases \
content_id=com.ubuntu.cloud:released:aws \
virt=hvm \
version=14.04 \
label=release \
region=us-east-1 \
root_store=ebs | \
sort -n | \
tail -5
This URL is also handy: https://cloud-images.ubuntu.com/releases/14.04/release/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment