A CLI tool for managing AWS Cognito user pools and user data. It allows you to list Cognito user pools, back up users from a specific pool, and restore users to a pool from a backup file.
- Go 1.24+ (or later) installed
- Valid AWS credentials configured
- Proper IAM permissions to list user pools, list pool users, and create users in Cognito
- Navigate to the project root.
- Run:
This compiles the project and produces a
go build -o cbr .
cbr
(orcbr.exe
on Windows) binary.
Once you have the binary, you can run the following commands:
-
List user pools
./cbr list
Lists up to 10 user pools at a time (it will iterate through all user pools until all are shown).
-
Back up users from a user pool
./cbr backup --pool-id <POOL-ID> --out <FILE-PATH>
--pool-id
: The user pool ID. Required.--out
: The path to the file where you want the backup written. Default:backup.json
.
-
Restore users to a user pool
./cbr restore --pool-id <POOL-ID> --in <FILE-PATH>
--pool-id
: The user pool ID. Required.--in
: Path to the backup file. Default:backup.json
.