turbot/aws_insights

Query: s3_buckets_for_codebuild_project

Usage

powerpipe query aws_insights.query.s3_buckets_for_codebuild_project

SQL

select
s3.arn as s3_bucket_arn
from
aws_codebuild_project as p,
aws_s3_bucket as s3
where
p.arn = $1
and (
s3.name = split_part(p.cache ->> 'Location', '/', 1)
or s3.name = p.artifacts ->> 'Location'
or s3.name = split_part(p.logs_config -> 'S3Logs' ->> 'Location', '/', 1)
or s3.name = split_part(p.source ->> 'Location', '/', 1)
);