- Le plus récent
- Le plus de votes
- La plupart des commentaires
This is a known issue with Amazon Cognito user pools. When you delete a user, there appears to be a hidden association that persists for some time, preventing you from creating a new user with the same email address (when using email as the username attribute).
There are a few potential explanations and workarounds:
-
Propagation delay: When you delete a user, it can take time (sometimes 24-48 hours) for the deletion to fully propagate through AWS systems. During this time, the email address may still be considered "in use" even though the user appears to be deleted.
-
Case sensitivity differences: If your user pool is case-insensitive (the default for user pools created in the AWS Management Console), there might be conflicts with usernames or email addresses that differ only by case. Check your user pool's case sensitivity settings.
-
Verification status: In user pools with alias attributes, Amazon Cognito prevents using the public API to check whether a user exists with a given email address. This behavior might be affecting your ability to recreate the user.
Possible workarounds:
-
Wait longer: Allow more time for the deletion to fully propagate through AWS systems.
-
Use admin APIs: Try using the
admin-create-usercommand instead of the public signup API, as it might bypass some of the restrictions. -
Disable and re-enable custom domain: If you're using a custom domain with your user pool, try disabling and then re-enabling it.
-
Contact AWS Support: If the issue persists after trying these workarounds, you may need to contact AWS Support to help clear any hidden associations with the email address.
The difference you observed between your production and development environments might be related to the different deletion methods used (programmatic deletion versus console deletion with the additional step of disabling login access).
Sources
Managing user existence error responses - Amazon Cognito
User pool case sensitivity - Amazon Cognito
One or more of the CNAMEs you provided are already associated with a different resource | AWS re:Post
Working with user attributes - Amazon Cognito
admin-create-user — AWS CLI 2.27.41 Command Reference
Contenus pertinents
- demandé il y a 8 mois
- demandé il y a 8 mois
- demandé il y a 19 jours

Unfortunately: