2024/07/24 15:24:30 profile root: skipping GetSessionToken because profile 'work' has no MFA serial defined
...
2024/07/24 15:24:30 [keyring] Found item "aws-vault (root)"
aws-vault: error: login: operation error STS: AssumeRole, https response error StatusCode: 403, RequestID: 392da53b-2cc1-43dc-ac66-e8e0bed4ed84, api error AccessDenied: User: arn:aws-cn:iam::xxxxxxxxxx:user/mfa is not authorized to perform: sts:AssumeRole on resource: arn:aws-cn:iam::xxxxxxxxxx:role/to-assume
I think profile 'work' should use MFA config of profile 'root' . just like awscli.
➜ aws sts get-caller-identity --profile work --no-cli-pager
Enter MFA code for arn:aws-cn:iam::xxxxxxxxxx:mfa/mfa:
My profile file:
then I run:
I got error:
I think profile 'work' should use MFA config of profile 'root' . just like awscli.