DEV Community

Learn2Skills for AWS Community Builders

Posted on • Updated on

New Update-Amazon Cognito now provides user pool deletion protection

You can now activate deletion protection for your Amazon Cognito user pools. When you configure a user pool with deletion protection, the pool cannot be deleted by any user. Deletion protection is now active by default for new user pools created through the AWS Console. You can activate or deactivate deletion protection for an existing user pool in the AWS Console, the AWS Command Line Interface, and API. Deletion protection prevents you from requesting the deletion of a user pool unless you first modify the pool and deactivate deletion protection.

To configure deletion protection

  1. Go to the Amazon Cognito console. You might be prompted for your AWS credentials.
  2. Choose User Pools.
  3. Choose an existing user pool from the list, or create a user pool.
  4. Choose the User pool settings tab. Locate Deletion Protection and select Activate or Deactivate.
  5. Confirm your choice in the next dialogue.

Image description

When you want to delete a user pool with an Amazon Cognito API request, you must first change DeletionProtection to Inactive in an UpdateUserPool request. If you don't deactivate deletion protection, Amazon Cognito returns an InvalidParameterException error. After you deactivate deletion protection, you can delete the user pool in a DeleteUserPool request.

Amazon Cognito activates Deletion protection by default when you create a new user pool. You can activate or deactivate deletion protection status in the Deletion protection container in the User pool settings tab in the Amazon Cognito console.

Refer- Cognito User Pool


Top comments (0)