How to use MFA with AWS CLI?

前端 未结 13 1299
太阳男子
太阳男子 2020-12-05 00:05

How do I type in the MFA code when using the AWS CLI? I have checked the documentation page of IAM http://docs.aws.amazon.com/cli/latest/reference/iam/index.html.

I

13条回答
  •  温柔的废话
    2020-12-05 00:31

    I have published a PR for aws-cli, which will allow to use mfa_serial in the credentials, that will force you to enter the token before making request to AWS (and it will be cached while token is valid)

    • Issue: https://github.com/aws/aws-cli/issues/3172
    • botocore PR: https://github.com/boto/botocore/pull/1399
    • aws-cli PR: https://github.com/aws/aws-cli/pull/3174

    Feel free to vote, if you want to get it in.

提交回复
热议问题