Users of AWS Cognito periodically face issues with backups. The Cognito user pool backup mechanism is not embedded into AWS. Therefore, this Lambda function can assist with the problem; using it, you can backup all users and groups from the Cognito user pool into an S3 bucket in JSON format. The aws-cognito-restore-lambda project can be used to recover users.
You can review the following documents on the Lambda to learn more: