❯ assume foobar --chain arn:aws:iam::123456789012:role/myrole
[i] If the browser does not open automatically, please open this link: https://device.sso.eu-central-1.amazonaws.com/?user_code=ABCD-EFGH
[i] Awaiting AWS authentication in the browser
[i] You will be prompted to authenticate with AWS in the browser, then you will be prompted to 'Allow'
[i] Code: ABCD-EFGH
[✔] [arn:aws:iam::123456789012:role/myrole](eu-central-1) session credentials will expire in 1 hour
but the following command then fails
❯ aws sts get-caller-identity
The config profile (arn:aws:iam::123456789012:role/myrole) could not be found
I think it's because AWS_PROFILE is set to arn:aws:iam::123456789012:role/myrole
Running unset AWS_PROFILE fixes the issue.
I run the following command
but the following command then fails
I think it's because
AWS_PROFILE
is set toarn:aws:iam::123456789012:role/myrole
Runningunset AWS_PROFILE
fixes the issue.