I am trying to use AWS CLI to search for resources by tags.
I prepare this tag.json
file:
{ "TagFilters": [ { "Value": "postgres-dev", "Key": "Name" } ] }
and use this command:
aws resourcegroupstaggingapi get-resources --tag-filters --cli-input-json file://tag.json
However, instead of returning only the databases which have this tag, it returns every resource in my AWS account (EC2, ELB, etc.)
Can anyone show me where did I do wrong?
Thanks a lot.