turbot/aws_insights

Query: sqs_queues_for_kms_key

Usage

powerpipe query aws_insights.query.sqs_queues_for_kms_key

SQL

select
q.queue_arn as queue_arn
from
aws_kms_key as k
join aws_kms_alias as a
on a.target_key_id = k.id
join aws_sqs_queue as q
on a.alias_name = q.kms_master_key_id
and k.region = q.region
and k.account_id = q.account_id
where
k.arn = $1;