turbot/steampipe-mod-aws-insights

Dashboard: AWS IAM Group Detail

This dashboard answers the following questions for each group:

  • What relationships does the group have with other resources?
  • How is the group configured?
  • What users are associated with the group?
  • What policies are attached to the group?
  • What inline policies are associated with the role?
This dashboard contains 2 cards, 1 graph, 1 input and 3 tables.

Usage

Install the mod:

mkdir dashboards
cd dashboards
powerpipe mod init
powerpipe mod install github.com/turbot/steampipe-mod-aws-insights

Start the Powerpipe server:

steampipe service start
powerpipe server

Open http://localhost:9033 in your browser and select AWS IAM Group Detail dashboard.

You could also snapshot and share results via Turbot Pipes:

powerpipe login
powerpipe dashboard run aws_insights.dashboard.iam_group_detail --share

Queries

This dashboard uses the the following queries:
-- Policies (attached to groups)
select
split_part(policy_arn, '/','2') as "Policy",
policy_arn as "ARN",
'Attached to Group' as "Via"
from
aws_iam_group as g,
jsonb_array_elements_text(g.attached_policy_arns) as policy_arn
where
g.arn = $1
and g.account_id = split_part($1, ':', 5)
-- Policies (inline from groups)
union select
i ->> 'PolicyName' as "Policy",
'N/A' as "ARN",
'Inline' as "Via"
from
aws_iam_group as grp,
jsonb_array_elements(grp.inline_policies_std) as i
where
arn = $1
and account_id = split_part($1, ':', 5);

Tags