I'm receiving an error from Cognito that a user exists after deleting them, they don't show in the console or list-user in the cli

0

The user in question did exist as an EXTERNAL_PROVIDER using Google. I deleted the account through the console, and was attempting to create a new user using aws cognito-idp admin-create-user

The error is: (UsernameExistsException) when calling the AdminCreateUser operation: An account with the given email already exists.

If I search in the console or using aws cognito-idp list-users the user and email doesn't show up.

Not sure where else to post this, it seems like a bug in Cognito. Hoping it will resolve itself somehow!

Carl
asked a year ago382 views
1 Answer
0

Hi!

For finding entities with the attribute EMAIL we will have to use the --filter option for the command that you used (aws cognito-idp list-users) and you can read more about the same here.

Now, for UsernameExistsException there is a document published and it has the following explanation under the subheading:

Preventing UsernameExistsException errors for email addresses and phone numbers on sign-up

When you configure alias attributes in your user pool, you can keep duplicate email addresses and phone numbers from generating UsernameExistsException errors in response to SignUp API requests. You must have created your user pool with email address or phone number as an alias attribute.

Does this help?

AWS
ART
answered a year ago
  • Please inform me if my answer was satusfactory by accepting my response with an up-vote.

  • Hi Carl, I am aspiring to become a Security committee member and your upvote helps in reaching my goal. If my answer was satidfactory, please do upvote.

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions