A Node.js CLI and library for backing up and restoring AWS Cognito User Pool users to/from JSON files.
cognito-backup-restore is a Node.js tool that addresses a key limitation of Amazon Cognito: the lack of a native backup and restore feature for user pools. It enables developers to export user data to JSON files for migration, disaster recovery, or replication purposes, and import users back into Cognito pools.
Developers and DevOps engineers managing AWS Cognito user pools who need to perform migrations, backups, or disaster recovery operations. It is particularly useful for teams moving users between services or replicating pools across environments.
Developers choose this tool because it fills a critical gap in the AWS Cognito ecosystem with a reliable, no-frills solution. It offers both a user-friendly CLI with interactive prompts and a programmatic TypeScript/JavaScript API, along with built-in rate limit handling to avoid AWS API throttling.
AIO Tool for backing up and restoring AWS Cognito User Pools
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Supports AWS credentials via profiles, environment variables, EC2 metadata, or direct keys, making it adaptable to various deployment scenarios, as shown in the CLI options.
Includes configurable delays between user batch operations to avoid AWS API rate limits, ensuring reliable backups for large pools without manual throttling.
Provides a command-line interface with prompts for missing options, reducing errors and making it user-friendly for ad-hoc operations.
Offers a TypeScript/JavaScript module for integration into custom scripts or automation workflows, allowing for flexible usage beyond the CLI.
Cannot retrieve or restore user passwords due to AWS Cognito's security model, requiring password resets or OTP emails after migration, as noted in the README.
Currently only supports JSON format for backups, with CSV conversion listed as a TODO item, which may hinder integration with systems requiring other formats.
Key enhancements like cross-region replication and Cognito Import Job integration are marked as TODO, indicating the tool is not fully mature for advanced use cases.
Requires Node.js 6.10 or newer, which might not be ideal for teams using other runtimes or preferring standalone binaries without additional installations.