turbot/aws_insights

Query: iam_roles_for_ecs_service

Usage

powerpipe query aws_insights.query.iam_roles_for_ecs_service

SQL

select
r.arn as role_arn
from
aws_ecs_service as s
left join aws_iam_role as r on r.arn = s.role_arn and s.arn = $1
where
r.arn is not null
and s.account_id = split_part($1, ':', 5)
and s.region = split_part($1, ':', 4);