AWS - Roles (Assume Role)

Step 1: Create the Role

  1. Sign in to the AWS Management Console.

  2. Navigate to IAM > Roles.

  3. Click Create role.

  4. Select Another AWS account under "Trusted entity" and enter the Account ID of the trusted account.

  5. Choose the permissions for the role (either attach policies directly or use a custom policy).

  6. Provide a Role name and click Create role.

Step 2: Grant Permissions to Assume the Role

  1. In the Account that will assume the role, go to IAM > Policies.

  2. Create or select a policy that grants the sts:AssumeRole action on the role.

  3. Attach the policy to the IAM user or group that needs to assume the role.

Step 3: Assume the Role

  1. In the trusted account, use the AWS CLI, SDK, or Console to assume the role


POC :

Last updated