Skip to content

Setting up Identity Center users with assume role access in a single-account configuration.

0

All of the examples I've seen on setting up IC users with the access to assume a role involves permission sets which is only available in the multi-account configuration using organizations. I am not using this setup. I am using a stand alone AWS account.

I have a role I want to assume and a user created. How can I setup the role to be assumable by the user?

asked 3 years ago1.7K views

1 Answer
0

In a single-account configuration, you can still set up a role to be assumable by a user by directly modifying the trust relationship policy of the IAM role. Here's how you can do it This is also a useful guide :- https://docs.aws.amazon.com/singlesignon/latest/userguide/get-set-up-for-idc.html Create the IAM Role: Go to the IAM console: https://console.aws.amazon.com/iam/ Click on "Roles" in the left navigation pane. Click on "Create role". Choose the trusted entity type as "Another AWS account" (since you want the user in the same account to assume this role). Enter your account ID in the "Account ID" field. Attach policies to the role as necessary. Click on "Next: Tags" and "Next: Review". Enter a name for the role and optionally a description, then click "Create role". Modify the Trust Relationship:

After creating the role, select the role from the list in the IAM console. Click on the "Trust relationships" tab. Click on "Edit trust relationship". Modify the trust relationship policy document to allow the specific user to assume the role. Here's an example policy document:

{
  "Version": "2012-10-17",
  "Statement": [
    {
      "Effect": "Allow",
      "Principal": {
        "AWS": "arn:aws:iam::<YOUR_ACCOUNT_ID>:user/<YOUR_USER_NAME>"
      },
      "Action": "sts:AssumeRole"
    }
  ]
}

Replace <YOUR_ACCOUNT_ID> with your AWS account ID and <YOUR_USER_NAME> with the username of the IAM user you want to grant access to. Save the Trust Relationship:

After modifying the policy document, click on "Update Trust Policy" to save the changes. Once you have completed these steps, the IAM user specified in the trust relationship policy document will have permission to assume the IAM role. Ensure that the policies attached to the role grant the necessary permissions for the user's intended actions after assuming the role.

Hope it clarifies and if does I would appreciate answer to be accepted so that community can benefit for clarity, thanks ;)

EXPERT

answered 3 years ago

  • In my example I am using an Identity Center user and not an IAM user. Unfortunately this solution did not work for an Identity Center type user.

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.