Control: AWS > PCI v3.2.1 > IAM > 2 IAM users should not have IAM policies attached
This control checks that none of your IAM users have policies attached. IAM users must inherit permissions from IAM groups or roles.
It does not check whether least privileged policies are applied to IAM roles and groups.
Remediation
To resolve this issue, do the following:
- Create an IAM group
- Assign the policy to the group
- Add the users to the group
The policy is applied to each user in the group.
To create an IAM group
- Open the IAM console.
- Choose Groups and then choose Create New Group.
- Enter a name for the group to create and then choose Next Step.
- Select each policy to assign to the group and then choose Next Step.
- The policies that you choose should include any policies currently attached directly to a user account. The next step to resolve a failed check is to add users to a group and then assign the policies to that group.
- Each user in the group gets assigned the policies assigned to the group.
- Confirm the details on the Review page and then choose Create Group.
To add users to an IAM group
- Open the IAM console.
- Choose Groups.
- Choose Group Actions and then choose Add Users to Group.
- Choose the users to add to the group and then choose Add Users.
To remove a policy attached directly to a user
- Open the IAM console.
- Choose Users.
- For the user to detach a policy from, in the User name column, choose the name.
- For each policy listed under Attached directly, to remove the policy from the user, choose the X on the right side of the page and then choose Remove.
- Confirm that the user can still use AWS services as expected.
PCI requirement(s): 7.2.1
Resource Types
This control targets the following resource types:
Category
In Your Workspace
Developers
- tmod:@turbot/aws-pciv3-2-1#/control/types/iamUserNoInlineAttachedPolicies
- tmod:@turbot/turbot#/control/categories/compliancePci
- turbot graphql controls --filter "controlTypeId:tmod:@turbot/aws-pciv3-2-1#/control/types/iamUserNoInlineAttachedPolicies"
Get Controls
Control Type URI
Category URI
GraphQL
CLI