Last active
April 19, 2016 00:20
-
-
Save phoolish/76cb20b7a34d82f659aca74702b7e9d7 to your computer and use it in GitHub Desktop.
list aws linux hvm ebs ami's
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/bash | |
# Requires aws-cli and jq to be installed | |
# | |
# Returns the name and ami for each release that matches | |
aws ec2 describe-images --owners amazon --filters Name=virtualization-type,Values=hvm | jq '[.Images[] | select(.Name | startswith("amzn-ami-hvm")) | select(.Name | endswith("ebs")) | { name: .Name, ami: .ImageId } ] | sort_by(.name)' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment