Skip to content

EC2-CLI | What I am missing? #7302

Answered by aBurmeseDev
xanderbilla asked this question in Q&A
Discussion options

You must be logged in to vote

Hi @xanderbilla, thanks for reaching out.

I copied and ran the command that you provided and received the expected output with aws-cli/2.7.31. Which CLI version are you using?

Could you try this command with a few changes I made here:

aws ec2 describe-instances  --query "Reservations[*].Instances[*].{Name:Tags[?Key=='Name']|[0].Value,Instance:InstanceId,Key:KeyName,PrivateAddress:PrivateIpAddress,PublicAddress:PublicIpAddress,Status:State.Name}" --output table

I also found this comment from a similar issue that might be worth giving it shot.

aws ec2 describe-instances --query 'Reservations[].Instances[].[Placement.AvailabilityZone,InstanceId,InstanceType,Platform,State.Name,Tags[?Key==`N…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by xanderbilla
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
2 participants