AWS IAM error : ‘Your authentication information is incorrect. Please try again’

The issue:

On AWS when we created an IAM user and tried to login with that user’s credentials we got into the following issue:

AWS IAM error : 'Your authentication information is incorrect. Please try again'

The reason:

This error happened because for some reason AWS was not liking the custom password we used.

The solution

As soon as we used the autogenerated password option and generated a password and then used that password for login and the login worked as expected.