Allow OperatorUser switch role

Enable OperatorUser to Switch Roles

When created, the OperatorUser has absolutely no permissions.
To allow the OperatorUser to assume the AdminRole, we need to grant the OperatorUser permission to assume the role.

  1. After creating the IAM Role AdminRole and IAM User OperatorUser, return to the main interface of the IAM service.
    • Click Users.
    • Click OperatorUser.

AWS IAM

  1. Click Add inline policy.

AWS IAM

An inline policy is a permission assigned directly to an IAM User and cannot be reused for another IAM User.

  1. Click on the JSON tab.
    • Enter the policy content below, remembering to replace <ACCOUNTID> with the Account ID you are using where you previously created the AdminRole.
    • This policy allows the IAM User to assume the AdminRole within the specified account ID.
    • Click Next.
{
   "Version": "2012-10-17",
   "Statement": {
       "Effect": "Allow",
       "Action": "sts:AssumeRole",
       "Resource": "arn:aws:iam::<ACCOUNTID>:role/AdminRole"
   }
}

AWS IAM AWS IAM

  1. Name the inline policy AllowSwitchAdminPolicy.

    Click Create Policy.

AWS IAM