This script exports users from AWS Cognito Pool into a CSV file
In order to install the dependencies you should have Python 2 or Python 3 installed on your platform, run any of below command depend on python version installed
-
Python 2:
$ pip install -r requirements.txt
-
Python 3:
$ pip3 install -r requirements.txt
To start export process you shout run below command (Note: use python
if you have Python 2 installed)
$ python3 export-cognito-users.py --poolId 'eu-west-1_XXXXXXXXX' --region eu-west-1
--poolId
[Required] - Provide user pool ID pf the user pool from which you want to export the users--region
[Optional] - Provide AWS region in which the user pool is present Default:eu-west-1
If you want to use specific AWS profile you can use AWS_PROFILE like below,
$ AWS_PROFILE={profile-name} python3 export-cognito-users.py --poolId 'eu-west-1_XXXXXXXXX' --region eu-west-1