Last active
November 22, 2018 09:41
-
-
Save alastairhm/4ac344d5959412b4e9382ae33c215c71 to your computer and use it in GitHub Desktop.
Return most recent AMI ID
This file contains hidden or 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
aws ec2 describe-images \ | |
--owners 'amazon' \ | |
--filters 'Name=description,Values=Amazon Linux AMI*' \ | |
--query 'sort_by(Images, &CreationDate)[-1].[ImageId]' \ | |
--output 'text' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment