Created
April 19, 2017 05:38
-
-
Save kongou-ae/36c396f6fcf43b58e55ddcd69eb8fc76 to your computer and use it in GitHub Desktop.
get ami-id of latest windows server by AMI
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
aws ec2 describe-images --owner self amazon --profile lambda --region ap-northeast-1 --filters 'Name=platform,Values=windows,Name=name,Values=Windows_Server-2012-R2*Japanese-64Bit-Base*' --query 'reverse(sort_by(Images,&CreationDate))[0].ImageId' --output text |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment