- EC2インスタンスの一覧を取得する。query編
$ aws ec2 describe-instances --query "$(echo 'Reservations[].Instances[].{
InstanceId:InstanceId,
ImageId:ImageId,
InstanceType:InstanceType,
PrivateIpAddress:PrivateIpAddress,
PublicIpAddress:PublicIpAddress,
State:State.Name,
Name:Tags[?Key==`Name`].Value|[0]
}')"