8

I've searched quite a bit but cannot find a policy to allow a user to create IAM Roles from both the management console (AWS website), and from AWS CLI.

Any help is greatly appreciated

EDIT: More clarification, the end-goal is to allow the user to create an Instance IAM Role.

John Rotenstein
  • 241,921
  • 22
  • 380
  • 470
Fadi
  • 1,329
  • 7
  • 22
  • 40

2 Answers2

13

Here is the policy you need to use.

{
  "Version": "2012-10-17",
  "Statement": [
    {
      "Sid": "Stmt1469200763880",
      "Action": [
        "iam:AttachRolePolicy",
        "iam:CreateRole"
      ],
      "Effect": "Allow",
      "Resource": "*"
    }
  ]
}
Piyush Patil
  • 14,512
  • 6
  • 35
  • 54
6

I've been using a policy like this to allow cloudformation templates to attach roles to ec2

If this isn't enough permissions then there is a list here

http://docs.aws.amazon.com/IAM/latest/UserGuide/list_iam.html

of all the available, allowable iam permissions and you can add as much as you like

{
    "Version": "2012-10-17",
    "Statement": [
        {
            "Action": [
                "iam:CreateInstanceProfile",
                "iam:RemoveRoleFromInstanceProfile",
                "iam:AddRoleToInstanceProfile",
                "iam:PassRole",
                "iam:DeleteInstanceProfile"
            ],
            "Effect": "Allow",
            "Resource": "*"
        }
    ]
}
Arbab Nazar
  • 22,378
  • 10
  • 76
  • 82
Vorsprung
  • 32,923
  • 5
  • 39
  • 63
  • I appreciate the link that shows the different kinds of permissions along with the policy that I need. – Fadi Jul 22 '16 at 18:25