Created
June 2, 2020 19:52
-
-
Save luis02lopez/ffde6f859809381548b3f1f8be14088c to your computer and use it in GitHub Desktop.
List EC2 running instances and only displaying ID, Name and Status.
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-instances --filters "Name=instance-state-name, Values=running" --query 'Reservations[*].Instances[*].{ID:InstanceId,Name:Tags[?Key==`Name`]|[*].Value,Type:InstanceType,Status:State.Name}' --output json |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment