I want to fetch the AWS KMS Keys ID based on tags assigned to them. I gone through AWS documentation but no luck.
Could someone help me out to get this thing resolved using AWS CLI?
Finally after checking multiple documentation, I came to know that there is an api called resourcegroupstaggingapi
in AWS to filter the resources based on tags if no native solution available . Below CLI command works well for my requirement.
Solution:
aws resourcegroupstaggingapi get-resources --region us-west-2 --resource-type-filters kms --tag-filters Key=Environment,Values=Dev