AWS MFA Issue Please verify your MFA serial number is valid and associated with this user

Viewed 8898

Been using https://github.com/broamski/aws-mfa to handle MFA for AWS with much success. I have three users who get the following error when trying to use it:

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.

Any ideas on how to troubleshoot? I have 20+ users that are just fine; I'm at the end of my rope on what these three users are doing different. I've verified that they didn't do a bad copy-pasta into their credentials file.

2 Answers

You should delete the default profile from your AWS machine, in the following files:

  • ~/.aws/credentials
  • ~/.aws/config

It worked for me.

Related