When calling user attributes for the cognito aws service for a user that can not be found, the call returns a UserNotFoundException:
aws cognito-idp admin-update-user-attributes --user-pool-id user-pool-id --username user-notfound@gmail --user-attributes Name="custom:authChallenge",Value="test"
An error occurred (UserNotFoundException) when calling the AdminUpdateUserAttributes operation: User does not exist.
But when I am doing the same call to docker container mock, the call returns a NotAuthorizedException:
aws --endpoint http://localhost:9229 cognito-idp admin-update-user-attributes --user-pool-id local_0tj8Jz4s --username user-notfound@gmail --user-attributes Name="custom:authChallenge",Value="test"
An error occurred (NotAuthorizedException) when calling the AdminUpdateUserAttributes operation: User not authorized
I'm getting the same with aws sdk 3, using the InitiateAuthCommand with an invalid username or password returns InvalidPasswordException with cognito-local but returns NotAuthorizedException with aws cognito
When calling user attributes for the cognito aws service for a user that can not be found, the call returns a
UserNotFoundException
:But when I am doing the same call to docker container mock, the call returns a
NotAuthorizedException
: