turbot/aws_insights

Query: sns_topics_for_rds_db_instance

Usage

powerpipe query aws_insights.query.sns_topics_for_rds_db_instance

SQL

select
s.sns_topic_arn
from
aws_rds_db_event_subscription as s,
jsonb_array_elements_text(source_ids_list) as ids
join aws_rds_db_instance as i
on ids = i.db_instance_identifier
where
i.arn = $1
and i.account_id = split_part($1, ':', 5)
and i.region = split_part($1, ':', 4)