turbot/aws_insights

Query: iam_users_with_direct_attached_policy

Usage

powerpipe query aws_insights.query.iam_users_with_direct_attached_policy

Steampipe Tables

SQL

with attached_compliance as (
select
arn,
case
when jsonb_array_length(attached_policy_arns) > 0 then 'with policies'
else 'no policies'
end as has_attached
from
aws_iam_user
)
select
has_attached,
count(*)
from
attached_compliance
group by
has_attached;

Dashboards

The query is used in the dashboards: