CLI command 'aws iam list-mfa-devices' does not return MFA devices belonging to the account root user

1

AWS CLI command aws iam list-mfa-devices does not appear to return MFA devices belonging to the account root user.

aws iam list-mfa-devices --user-name root
An error occurred (NoSuchEntity) when calling the ListMFADevices operation: The user with name root cannot be found.

However, CLI command aws iam list-virtual-mfa-devices does return virtual MFA devices belonging to the account root user.

Is this by design?

Thanks!

Rachel
已提问 1 年前712 查看次数
1 回答
1
已接受的回答

Yes, it is by design. Note that root is not an IAM user, which is why it cannot find the user. aws iam list-users does not list root in the results.

profile picture
专家
bwhaley
已回答 1 年前
profile pictureAWS
专家
kentrad
已审核 1 年前
  • Got it, thanks. Is there any way to see if a hardware MFA device is configured for the root account via the CLI?

  • Not to the best of my knowledge, unfortunately. The root user is configured in the console.

您未登录。 登录 发布回答。

一个好的回答可以清楚地解答问题和提供建设性反馈,并能促进提问者的职业发展。

回答问题的准则

相关内容