I would like to ask a question in line with above. The cli below works perfectly fine now I would also like to capture two other tags in addition to the 'Name' tag called 'Application' and 'Owner'. How can I change this to add Application and Owner tags to the out-put. So basically:
aws ec2 describe-instances --query "Reservations[].Instances[].[Placement.AvailabilityZone,InstanceId,InstanceType,Platform, State.Name,PrivateIpAddress,StateTransitionReason,Tags[?Key=='Name'] | [0].Value]" --output table
What I am thinking is how do I duplicate Tags[?Key=='Name'] | [0].Value] to make it also pull Application and Owner so in effect Tags[?Key=='Application'] | [0].Value] and Tags[?Key=='Owner'] | [0].Value]? So that when I run the cli it pulls three different tags.
tableoutput is not very useful.