Skip to content

Amplify Cognito user pool deleted

0

I've been building a couple Amplify builds in my work and was cleaning up my cognito user pools. I accidentally deleted the user pool that is attached to my local host that I run the dev environment on and can no longer log in from there. The deployed cognito user pool is still there but is a separate log in.

Is there a way I can recover or relaunch the user pool for that dev environment?

1 Answer
0

When you delete an Amazon Cognito user pool, Amazon Cognito retains it in an inactive state for 14 days before beginning the cleanup process. If you've recently deleted your user pool (within the last 14 days), you can contact AWS Support to request restoration assistance.

If it's been less than 14 days since deletion, this is your best option for recovery as Amazon Cognito specifically maintains deleted pools during this period to help with accidental deletions.

If recovery isn't possible or you prefer to create a new user pool for your development environment, you'll need to:

  1. Create a new user pool through the Amplify CLI or AWS Console
  2. Configure it with the same settings as your previous pool
  3. Update your local application configuration to point to this new user pool

For Amplify projects specifically, you may need to run amplify add auth to create a new authentication resource and then amplify push to provision it. This will generate a new user pool that you can use for your local development environment.

Remember that for future user pools, you can activate deletion protection to prevent accidental deletions. This feature requires you to explicitly deactivate protection before a user pool can be deleted.
Sources
DeleteUserPool - Amazon Cognito User Pools
User pool deletion protection - Amazon Cognito

answered a year ago

AWS
SUPPORT ENGINEER

reviewed a year ago

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.