AWS user is not authorized to perform: iam: AttachRolePolicy

  • Go to IAM dashboard.
  • Select Users menu from the left hand side menu.
  • Select the user you want to provide the permission.
  • Select the permissions tab and click on Add Permissions button.
  • Click Create Policy link.
  • On Create Policy page, select the following things:
    • Select IAM service.
    • In Access Level Permissions management, select AttachRolePolicy
    • In Resources, select Specific Resource and select Any in this account checkbox

  • Click Next, to review poilcy.
  • In the name field enter IAMAttachRolePolicy.
  • Click Create Policy button.
  • Next page will give you a success message that the polciy has been created.
  • Go back to the 3rd step (Select the user you want to provide the permission) and click Next: Permissions button .
  • In the Set permissions section, click Attach existing policies directly tab.
  • Check the IAMAttachRolePolicy policy.
  • Click next to attach IAMAttachRolePolicy policy to the user.
  • The user should be able to see the create the policy now.