turbot/aws_insights

Query: iam_roles_for_ecs_task_definition

Usage

powerpipe query aws_insights.query.iam_roles_for_ecs_task_definition

SQL

select
r.arn as role_arn
from
aws_ecs_task_definition as d
left join
aws_iam_role as r
on r.arn = d.execution_role_arn
and d.task_definition_arn = $1
where
r.arn is not null
union
select
r.arn as role_arn
from
aws_ecs_task_definition as d
left join aws_iam_role as r on r.arn = d.task_role_arn and d.task_definition_arn = $1
where
r.arn is not null