Skip to content

Instantly share code, notes, and snippets.

@etelford
Forked from chrisdiana/export-cognito-users.sh
Created April 3, 2020 15:02
Show Gist options
  • Save etelford/66e5bec26cd7b0ee88566f623d4fec08 to your computer and use it in GitHub Desktop.
Save etelford/66e5bec26cd7b0ee88566f623d4fec08 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