Created
September 7, 2021 07:56
-
-
Save tfentonz/39a0ff2136a724bc634fc491c95139d1 to your computer and use it in GitHub Desktop.
AWS CLI get instance ID by name
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-instances \ | |
--filters "Name=tag:Name,Values=some-name" \ | |
--query 'Reservations[].Instances[].[InstanceId]' \ | |
--output text |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment