IAM Group without users

ID

aws_iam_group_without_users

Severity

info

Vendor

AWS

Resource

IAM

Tags

reachable

Description

IAM Group without users. If the IAM group has no attached users, remove the IAM group in order to prevent attaching unauthorized IAM users.

To fix it, you must remove the IAM groups without users.

Learn more about this topic at AWS IAM user groups.

Examples

---
- name: Example playbook
  hosts: localhost
  tasks:
    - name: Create a group
      community.aws.iam_group:
        name: testgroup1
        state: present

Mitigation / Fix

---
- name: Example playbook
  hosts: localhost
  tasks:
    - name: Create a group
      community.aws.iam_group:
        name: testgroup1
        users:
          - test_user1
          - test_user2
        state: present