More Info:

Role should not have inline policies attached to them.

Risk Level

Low

Address

Security

Compliance Standards

PCIDSS, NIST, GDPR

Triage and Remediation

How to Prevent

To prevent roles from having inline policies in AWS IAM using the AWS Management Console, follow these steps:

  1. Navigate to IAM Dashboard:

    • Sign in to the AWS Management Console.
    • Open the IAM (Identity and Access Management) dashboard by selecting “IAM” from the services menu.
  2. Review Existing Roles:

    • In the IAM dashboard, select “Roles” from the left-hand navigation pane.
    • Review the list of roles to identify any roles that have inline policies attached.
  3. Remove Inline Policies:

    • Click on the role name to view its details.
    • In the “Permissions” tab, look for any inline policies listed under “Inline Policies.”
    • For each inline policy, click on the policy name and then select “Delete” to remove the inline policy from the role.
  4. Attach Managed Policies:

    • Instead of using inline policies, attach managed policies to the role.
    • In the role details, go to the “Permissions” tab and click “Attach policies.”
    • Select the appropriate managed policies from the list and click “Attach policy” to apply them to the role.

By following these steps, you can ensure that roles do not have inline policies and instead use managed policies, which are easier to manage and audit.

Additional Reading: