Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/amazon-s3/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Amazon s3 未知选项:arn:aws:iam::111111111:mfa/用户_Amazon S3_Multi Factor Authentication - Fatal编程技术网

Amazon s3 未知选项:arn:aws:iam::111111111:mfa/用户

Amazon s3 未知选项:arn:aws:iam::111111111:mfa/用户,amazon-s3,multi-factor-authentication,Amazon S3,Multi Factor Authentication,我正在尝试使用MFA为我的aws帐户获取临时凭据。我正在终端上打字 aws sts get-session-token arn:aws:iam::11111111111:mfa/user --token-code 111111 使用所有正确的值,但我得到: usage: aws [options] <command> <subcommand> [<subcommand> ...] [parameters] To see help text, you can

我正在尝试使用MFA为我的aws帐户获取临时凭据。我正在终端上打字

aws sts get-session-token arn:aws:iam::11111111111:mfa/user --token-code 111111
使用所有正确的值,但我得到:

usage: aws [options] <command> <subcommand> [<subcommand> ...] [parameters]
To see help text, you can run:

  aws help
  aws <command> help
  aws <command> <subcommand> help

Unknown options: arn:aws:iam::11111111111:mfa/user
用法:aws[选项][…][参数]
要查看帮助文本,您可以运行:
aws帮助
aws帮助
aws帮助
未知选项:arn:aws:iam::11111111:mfa/用户

我以前做过这件事,而且效果很好,所以我不确定到底出了什么问题。谢谢大家!

您需要使用
--serial number
参数。对我有用

aws sts get-session-token --serial-number get-session-token arn:aws:iam::11111111111:mfa/user --token-code 111111

非常感谢。不幸的是,我仍然得到同样的错误。你知道我还能试什么吗?你确定,你也会犯同样的错误。我所能想到的就是将aws cli更新到最新版本。