To find list of instances without tag "Environment", I used the following command.
aws ec2 describe-instances --query 'Reservations[?Instances[?length(Tags[?Key=='Environment']) == `0`]].Instances[].InstanceId' --output text
Now, how to find the list of volume-Id doesn't have a specific tag? Suppose some of my volumes have tag "Environment". When executing a command the result should contain volume-Ids without the tag Environment.
Similarly, I need to list the AMI and snapshot also.