# 1.15 Ensure IAM Users Receive Permissions Only Through Groups (Automated)

- Source: https://support.icompaas.com/support/solutions/articles/62000233112-1-15-ensure-iam-users-receive-permissions-only-through-groups-automated-
- Section: [Solutions](https://support.icompaas.com/support/solutions) › [AWS CIS V.4 Level 1 Benchmarks](https://support.icompaas.com/support/solutions/62000112671) › [CIS Control 1](https://support.icompaas.com/support/solutions/folders/62000169194)
- Last updated: 2026-05-29
- Publisher: iCompaas, Inc. (https://www.icompaas.com)

### **Profile Applicability:**

**Level 1**

## **Description:**

AWS IAM users should receive permissions only through IAM groups, rather than having directly attached policies or inline policies.AWS provides multiple ways to assign policies to users:

1.  Inline user policies (directly attached to a user). 
    
2.  Managed policies attached directly to a user. 
    
3.  Group-based policies (Recommended). 
    
4.  Group-based inline policies. 
    

## Rationale:

-   Centralized access management improves security and reduces privilege creep.
    
-   Groups ensure least privilege by assigning roles rather than user-specific access.
    
-   Easier permissions audits since policies are applied at the group level.
    
-   Reduces risk of excessive permissions or policy misconfigurations.
    

## Impact:

-   Failure to enforce group-based permissions may lead to users with excessive or outdated privileges.
    
-   User-specific policies increase complexity, making it harder to audit permissions.
    
-   Manually managing policies at the user level is error-prone and inefficient.
    

Default Value:

By default, AWS allows:

-   IAM users to have directly attached policies.
    
-   IAM users to have inline policies.
    
-   IAM users are not required to belong to a group.
    

## Pre-Requisites:

1.  IAM Administrator Access:
    
    -   Requiredpermissions: iam:ListUsers, iam:ListAttachedUserPolicies, iam:ListUserPolicies, iam:RemoveUserFromGroup.
        
2.  Access to AWS CloudTrail (optional):
    
    -   To monitor changes to IAM user permissions.
        
3.  IAM Policy Enforcement:
    
    -   Implement AWS Organizations Service Control Policies (SCPs) to enforce group-based permissions only.
        

## Remediation:  
Test Plan:  
Using Console Steps:

1.  Login to AWS Console as an IAM Administrator.
    
2.  Open the IAM Console → Click Users.
    

                 ![](https://support.icompaas.com/assets/kb/17c53ccf4eb08439.png)

3.  Click on an IAM user's name → Go to the Permissions tab.                         ![](https://support.icompaas.com/assets/kb/8566d32f6a6d20d8.png)                         
    

                ![](https://support.icompaas.com/assets/kb/cad679a05d270c57.png)

4.  Expand Permissions policies:
    
    -   If any policies are attached directly to the user, they are non-compliant.
        
5.  Repeat this for all IAM users.
    

## Using Command Line  Steps:

-   List all IAM users:

 aws iam list-users --query 'Users\[\*\].UserName' --output text

-   Check each IAM user for directly attached policies:

aws iam list-attached-user-policies --user-name <iam\_user>

If any policies are returned, the user is non-compliant.

-   Check each IAM user for inline policies:

aws iam list-user-policies --user-name <iam\_user>

If any policies are returned, the user is non-compliant.

-   Repeat for all IAM users.

## Implementation Steps:

Step 1: Create an IAM Group and Assign a Policy

## Using Console Steps

1.  Login to AWS Console as an IAM Administrator.
    
2.  Open IAM Console → Click Groups.
    

                                  ![](https://support.icompaas.com/assets/kb/f4cd027d3e820a10.png)

3.  Click Create New Group.                        ![](https://support.icompaas.com/assets/kb/be09406a3f4e3559.png)                        
    
4.  Enter a Group Name → Click Next Step.                  ![](https://support.icompaas.com/assets/kb/68a15be040d750f5.png)                  
    
5.  Select the appropriate IAM Policies to attach to the group.
    

                   ![](https://support.icompaas.com/assets/kb/e53502fc0ac68524.png)

6.  Click Create Group.     ![](https://support.icompaas.com/assets/kb/4003165a1d58b9b0.png)     
    

## Using Command Line Steps

-   Create an IAM group:

aws iam create-group --group-name <group\_name>

-   Attach a policy to the group:

 aws iam attach-group-policy --group-name <group\_name> --policy-arn arn:aws:iam::aws:policy/<policy\_name>

Step 2: Add Users to the IAM Group

Using Console Steps

1.  Login to AWS Console as an IAM Administrator.
    
2.  Open IAM Console → Click Groups.
    
3.  Select the group to add users to.
    
4.  Click Add Users To Group.
    

            ![](https://support.icompaas.com/assets/kb/2969d56c163ac648.png)

5.  Select the users to be added.
    
6.  Click Add Users
    

              .![](https://support.icompaas.com/assets/kb/f5e9cd257c9bd192.png)

Command Line Steps

-   Add an IAM user to the group:

 aws iam add-user-to-group --group-name <group\_name> --user-name <iam\_user>

-   Confirm user is part of the group:

 aws iam list-groups-for-user --user-name <iam\_user>

Step 3: Remove Direct Policy Attachments from IAM Users

Console Steps

1.  Login to AWS Console as an IAM Administrator.
    
2.  Open IAM Console → Click Users.
    
3.  Select a user with directly attached policies.     ![](https://support.icompaas.com/assets/kb/4a481e3d79cb90de.png)     
    
4.  Click Permissions tab → Expand Permissions policies.
    

               ![](https://support.icompaas.com/assets/kb/dafc7a8ff51d32db.png)

5.  Click X next to each directly attached policy → Click Detach.
    

                ![](https://support.icompaas.com/assets/kb/172eabd2fb24db5a.png)

Command Line Steps

-   Detach directly attached policies from a user:

aws iam detach-user-policy --user-name <iam\_user> --policy-arn arn:aws:iam::aws:policy/<policy\_name>

-   Remove inline policies from a user:

 aws iam delete-user-policy --user-name <iam\_user> --policy-name <policy\_name>

Backout Plan:

If an IAM user requires a direct policy temporarily: Reattach the necessary policy:

aws iam attach-user-policy --user-name <iam\_user> --policy-arn arn:aws:iam::aws:policy/<policy\_name>

-   Ensure that group-based permissions are established before revoking the temporary policy.

## References:

-   [AWS IAM Best Practices](https://docs.aws.amazon.com/IAM/latest/UserGuide/best-practices.html)
    
-   [IAM Managed vs Inline Policies](https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_managed-vs-inline.html)
    
-   [IAM User Group Management](https://docs.aws.amazon.com/cli/latest/reference/iam/index.html)

## Related compliance guidance

- [SOC 2 compliance: a practical implementation guide for cloud-native SaaS teams](https://support.icompaas.com/compliance/soc-2-trust-services-criteria): Configuration checks like this one are the technical half of a SOC 2 / ISO 27001 programme — the guide shows where they fit, what else an auditor expects, and how to evidence them.
- [ISO/IEC 27001:2022 compliance: a practical implementation guide](https://support.icompaas.com/compliance/iso-27001-2022): ISO 27001 Annex A.8 (technological controls) is where cloud hardening evidence lands; the guide shows how to run the ISMS around it.
