EC2InstancesNotMatchingInstanceType

nicolaw 30th July 2019 at 4:04pm
AWS awscli jq json JSON
aws ec2 describe-instances --region=eu-west-1 --output json | jq -r '.Reservations[].Instances[]|(select( (.InstanceType|startswith("m5.")|not) and (.InstanceType|startswith("t3.")|not) ))|[.InstanceId, (.Tags[]|select(.Key == "Name")|.Value), .State.Name, .InstanceType]|join(",")'