Filtering AMI by name using aws-cli
12,200
From Listing and Filtering Using the CLI and API:
You can also use wildcards with the filter values. An asterisk (*) matches zero or more characters, and a question mark (?) matches exactly one character.
List any RHEL 7.x HVM GA images
aws ec2 describe-images --filters Name=name,Values=RHEL-7.?_HVM_GA*
Related videos on Youtube
![Jedi](https://i.stack.imgur.com/hVuGD.jpg?s=256&g=1)
Author by
Jedi
Updated on September 18, 2022Comments
-
Jedi almost 2 years
Is there a way to filter public AMIs that contain a particular string (say
abcd
)?The command:
aws ec2 describe-images --filters Name=name,Values=abcd
returns only those AMIs that exactly match
Name=abcd
-
TJ Biddle almost 6 yearsNote: It must be
Name=name
and notName=Name
as this answer states; which is odd since if you run adescribe-images
it seems like it would be the other way around.