Hi, I’m Dung Huynh Duc . Nice to meet you.

About Me

I’m a full stack developer. I’m a fast learner and self-taught coder. I often take my time for researching and learning about hot and trending technology.

blog_hero_#TIL 6 - Delete all users from AWS Cognito
AWS
AWS Cognito
CLI

#TIL 6 - Delete all users from AWS Cognito

Dung Huynh

Tue Sep 01 2020

    #!/bin/sh
    aws cognito-idp list-users --user-pool-id POOL_ID | jq -r '.Users | .[] | .Username' |
    while read uname; do
      echo "Deleting $uname";
      aws cognito-idp admin-delete-user --user-pool-id POOL_ID --username $uname;
    done