Skip to content

hawkerfun/cognito-csv-exporter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Export Amazon Cognito User Pool records into CSV

This project allows to export user records to CSV file from Amazon Cognito User Pool

Installation

In order to use this script you should have Python 2 or Python 3 installed on your platform

  • run pip install -r requirements.txt (Python 2) or pip3 install -r requirements.txt (Python 3)

Run export

To start export proccess you shout run next command (Note: use python3 if you have Python 3 instaled)

  • $ python CognitoUserToCSV.py --user-pool-id 'us-east-1_XXXXXXXXX' -attr Username email_verified given_name family_name UserCreateDate
  • Wait until you see output INFO: End of Cognito User Pool reached
  • Find file CognitoUsers.csv that contains all exported users. Example

Script Arguments

  • --user-pool-id [Required] - The user pool ID for the user pool on which the export should be performed
  • -attr or --export-attributes [Required] - List of Attributes that will be saved in CSV file
  • --region [Optional] - The user pool region the user pool on which the export should be performed Default: us-east-1
  • -f or --file-name [Optional] - CSV File name or path. Default: CognitoUsers.csv
  • --num-records [Optional] - Max Number of Cognito Records tha will be exported. Default: 0 - All
  • --profile [Optional] - The AWS profile to use, if not provided the default one will be used
  • --starting-token [Optional] - The starting pagination token to continue from if provided
Note:

If you need to Back up your intire cognito instance pool, take a look for this tool: https://www.npmjs.com/package/cognito-backup-restore

About

Amazon Cognito User Pool CSV exporter

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •  

Languages