2.0.24 • Published 6 years ago

cognito-tool v2.0.24

Weekly downloads
2
License
MIT
Repository
github
Last release
6 years ago

Table of Contents

npm version

cognito-tool

Amazon doesn't have any ways of backing up and restore heir AWS Cognito User Pools currently.

cognito-tool is a CLI for backing up and restoring the users. Note: AWS has no way of extracting the passwords of cognito users

This repo is forked from mifi/cognito-backup and added restore features. Package name is changed from cognito-backup to cognito-tool to adapt the new functions which are not only focus on backup tasks

Notes for cognito user restore

1) When restoring, this tool sets the default password to P@ssw@rd1234 to all cognito users. 2) Cognito user's sub (The UUID of the cognito user) is unique in aws globally. When restoring, the original sub can't be restored. New sub will be set when restoring.

Install

npm install -g cognito-tool

Usage

$ cognito-tool backup-users <user-pool-id> <options>  Backup all users in a single user pool

$ cognito-tool backup-all-users <options>  Backup all users in all user pools for this account

$ cognito-tool restore <user-pool-id> --file <JSON_users_file>  Restore users to user pool

Examples

Backup

$ cognito-tool backup-users eu-west-1_1_12345
$ cat eu-west-1_1_12345.json

$ cognito-tool backup-all-users eu-west-1_1_12345 --dir 20180326
$ cd 20180326
$ cat eu-west-1_1_12345.json

# Nominate region if not set in environment variable or ~/.aws/credentials
$ AWS_region=ap-southeast-2 cognito-tool backup-all-users ap-southeast-2_123456

Restore

$ cognito-tool restore ap-southeast-2_345678 --file eu-west-1_1_12345.json
2.0.24

6 years ago

2.0.23

6 years ago

2.0.22

6 years ago

2.0.21

6 years ago

2.0.19

6 years ago

2.0.18

6 years ago

2.0.17

6 years ago

2.0.16

6 years ago

2.0.15

6 years ago

2.0.14

6 years ago

2.0.13

6 years ago

2.0.12

6 years ago

2.0.11

6 years ago

2.0.10

6 years ago

2.0.9

6 years ago

2.0.8

6 years ago

2.0.7

6 years ago

2.0.6

6 years ago

2.0.5

6 years ago

2.0.4

6 years ago

2.0.3

6 years ago

2.0.2

6 years ago

2.0.1

6 years ago