amazon-web-services - AWS MFA 问题 请验证您的 MFA 序列号是否有效并与该用户关联
问题描述
一直在使用https://github.com/broamski/aws-mfa为 AWS 处理 MFA 并取得了很大的成功。我有三个用户在尝试使用它时遇到以下错误:
An error occurred (AccessDenied) when calling the GetSessionToken operation: MultiFactorAuthentication failed, unable to validate MFA code. Please verify your MFA serial number is valid and associated with this user.
关于如何排除故障的任何想法?我有 20 多个用户都很好;对于这三个用户的不同之处,我已经走到尽头了。我已经验证他们没有在他们的凭证文件中复制粘贴错误。
解决方案
如果您没有指定配置文件(内联或作为环境变量),您会得到这个。您不需要删除默认配置文件,如果未在上下文中指定命名配置文件,则它使用默认配置文件。
https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-profiles.html
$ export AWS_PROFILE=user1
推荐阅读
- spring - 如何在带有 Scala 的注释中将 Spring 表达式语言用于数组
- android - 创建特价商品布局
- javascript - Neopixel / WS2811 通过本地 HTML 控制
- batch-file - Schtasks CMD .bat 麻烦
- c++ - 为 c++ st3 创建变量语法高亮
- csv - 如何在 tensorflow 2.0 中定义嵌入列?
- c# - Win10 .NET 3.5 RSACryptoServiceProvider.Dispose 引发 CryptographicException(访问被拒绝或共享违规)
- apache-spark - Pyspark 数据框列计算
- r - 基于条件滞后的变异
- java - JAVA_HOME 变量问题