AWS Console switch role transitively twice in a row

Viewed 383

I use the AWS Console, to switch my role from A to B on the same account (account1). Then I would like to switch from B to role C which is on another account (account2). The switch from A to B is working, but then from B to C is not.

  • B trusts in arn:aws:iam::account1.id:role/A
  • C trusts in arn:aws:iam::account2.id:role/B

Is this a limitation of AWS, or should it be possible to switch roles transitively?

1 Answers

I found the answer, it is not possible to switch roles transitively in AWS Console

Based on this AWS documentation:

When you switch roles in the AWS Management Console, the console always uses your original credentials to authorize the switch. This applies whether you sign in as an IAM user, as a SAML-federated role, or as a web-identity federated role. For example, if you switch to RoleA, it uses your original user or federated role credentials to determine if you are allowed to assume RoleA. If you then try to switch to RoleB while you are using RoleA, your original user or federated role credentials are used to authorize your attempt, not the credentials for RoleA.

Related