Created
May 16, 2023 17:07
-
-
Save benmotyka/3c82fbb391f08ba0ba2d82a129ba98f4 to your computer and use it in GitHub Desktop.
AWS CLI list all ec2 instances (name, ip, ssh key) in table format
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=instance-state-name,Values=running" --query 'Reservations[*].Instances[*].[Tags[?Key==`Name`].Value,PrivateIpAddress,KeyName,`--------------------`]' --output table |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment