#cli #aws #cognito

bin+lib cognito-user-reader

Utility to retrieve all users in a specific AWS user pool

20 releases (10 breaking)

0.11.0 Jul 15, 2020
0.10.0 Mar 20, 2020
0.9.0 Mar 20, 2020
0.2.0 Sep 8, 2019

#127 in HTTP server

Download history 27/week @ 2020-05-20 39/week @ 2020-05-27 38/week @ 2020-06-03 19/week @ 2020-06-17 19/week @ 2020-07-01 20/week @ 2020-07-08 43/week @ 2020-07-15 14/week @ 2020-07-22 60/week @ 2020-08-12 22/week @ 2020-08-19 20/week @ 2020-08-26 60/week @ 2020-09-02

95 downloads per month

MIT license

422 lines

Cognito User Reader

ActionsStatus Crates.io

This small utility will fetch all the users and emails from a Cognito User Pool of your choice and print a nice file for you.


You can compile it yourself:

cargo install cognito-user-reader # for AWSCLI 1
# or
cargo install cognito-user-reader --features awscli2 # for AWSCLI 2

or you can download the executable from GitHub releases and add it to your path.


You need to have previously installed awscli.

This crate supports both aws-cli versions 1 and 2. By default it will assume aws-cli 1 so if you're using version 2 you have the awscli2 feature available.


Depending on how you have configured AWS, you may need to use something similar to assume-role before using cur in order to access the data:

assume-role your-env

Then, just execute:

cur <pool_id> [-p] [-s] [-a custom:company] [-i "id1" "id2"] [-e "a@email.com" "b@email.com"] [-n] [-m] [-x 20] [-c 2020-02-10]

You will see a new cognito_users.csv file in your working directory with all your user's emails.

If you want to learn more about the options of this cli just execute cur -h.


  • -a: Array of attributes that you want to get for your users. Email is always included.
  • -p: Prints the result to the terminal
  • -s: Shows also the unconfirmed users
  • -i: Array of user ids to be filtered
  • -e: Array of user emails to be filtered
  • -n: Inverts the userId filter
  • -m: Inverts the user email filter
  • -x: Max number of users to retrieve
  • -c: Only shows users created from this date


~71K SLoC