Skip to content

Instantly share code, notes, and snippets.

@geotheory
Forked from chrisdiana/export-cognito-users.sh
Created February 24, 2020 09:27
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 geotheory/dce11cba3eb51205681df8ed128877f9 to your computer and use it in GitHub Desktop.
Save geotheory/dce11cba3eb51205681df8ed128877f9 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