turbot/aws_insights

Query: media_stores_for_cloudfront_distribution

Usage

powerpipe query aws_insights.query.media_stores_for_cloudfront_distribution

SQL

select
arn as mediastore_arn
from
aws_media_store_container
where
account_id = split_part($1,':',5)
and endpoint in
(
select
'https://' || (origin ->> 'DomainName')
from
aws_cloudfront_distribution,
jsonb_array_elements(origins) as origin
where
arn = $1
and account_id = split_part($1,':',5)
);