Using AWS CLI to filter EC2 Resources by a tag with wildcard

Note I used AWS CLI V2 for this – not certain if it works with V1 but it is easy enough to upgrade to V2 which has been out for some-time.

I’ll start off by saying, this is a very common requirement in my humble opinion and AWS as usual does a poor job of documenting – with ZERO applicable examples.

Note: the quotes are required.

aws ec2 describe-instances --filters 'Name=tag:Name,Values=imply*' --profile myprofile

Leave a Comment

Scroll to Top