Skip to content

Instantly share code, notes, and snippets.

@Softsapiens
Forked from chrisdiana/export-cognito-users.sh
Created February 15, 2021 08:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Softsapiens/31452de58530d39ff9177339f43f2f51 to your computer and use it in GitHub Desktop.
Save Softsapiens/31452de58530d39ff9177339f43f2f51 to your computer and use it in GitHub Desktop.
Export AWS Cognito User Pool
# Export as Text Table
aws --region XXXXXXXXX cognito-idp list-users --user-pool-id XXXXXXXXXXXXX --output table > ~/users.txt
# Export as JSON
aws --region XXXXXXXXX cognito-idp list-users --user-pool-id XXXXXXXXXXXXX --output json > ~/users.json
# Export User Pool with more than 60 users (pagination)
aws --region XXXXXXXXX cognito-idp list-users --user-pool-id XXXXXXXXXXXXX --pagination-token INCREDIBLYLONGSTRINGHERE --output json > ~/users-2.json
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment