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!

1 Antwort
1
Akzeptierte Antwort

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
EXPERTE
bwhaley
beantwortet vor einem Jahr
profile pictureAWS
EXPERTE
kentrad
überprüft vor einem Jahr
  • 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.

Du bist nicht angemeldet. Anmelden um eine Antwort zu veröffentlichen.

Eine gute Antwort beantwortet die Frage klar, gibt konstruktives Feedback und fördert die berufliche Weiterentwicklung des Fragenstellers.

Richtlinien für die Beantwortung von Fragen