turbot/aws_insights

Query: iam_policy_input

Usage

powerpipe query aws_insights.query.iam_policy_input

Steampipe Tables

SQL

with policies as (
select
title as label,
arn as value,
json_build_object(
'account_id', account_id
) as tags
from
aws_iam_policy
where
not is_aws_managed
union all select
distinct on (arn)
title as label,
arn as value,
json_build_object(
'account_id', 'AWS Managed'
) as tags
from
aws_iam_policy
where
is_aws_managed
)
select
*
from
policies
order by
label;