-
-
Save malikperang/c7651b527b4016859ca52b1d63ed991e to your computer and use it in GitHub Desktop.
List the ten latest ubuntu public images (AMI's) on AWS
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
# List the ten latest ubuntu public images on AWS | |
# Output similar to: | |
# 2017-09-26T16:18:51.000Z ubuntu/images/hvm-ssd/ubuntu-zesty-17.04-amd64-server-20170922 hvm True ami-5cc00825 | |
# 2017-09-21T21:20:20.000Z ubuntu/images/hvm-ssd/ubuntu-xenial-16.04-amd64-server-20170919 hvm True ami-17d11e6e | |
# 2017-09-19T10:54:43.000Z ubuntu/images/hvm-ssd/ubuntu-trusty-14.04-amd64-server-20170918 hvm True ami-e872bf91 | |
# 2017-09-05T13:12:32.000Z ubuntu/images/hvm-ssd/ubuntu-trusty-14.04-amd64-server-20170831 hvm True ami-01589c78 | |
# ...etc | |
aws ec2 describe-images \ | |
--filters Name=name,Values=ubuntu/images/hvm-ssd/ubuntu* \ | |
--query 'Images[*].[CreationDate,Name,VirtualizationType,Public,ImageId]' \ | |
--output text | sort -k1 -r | head -n10 | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment