-
aws cli
& set upIAM
config in home directory -
Install JQ
Replace the variable COGNITO_USER_POOL_ID
with Pool Id
in the following command
aws cognito-idp list-users --user-pool-id $COGNITO_USER_POOL_ID | jq -r '.Users | .[] | .Username' | while read uname1; do echo "Deleting $uname1"; aws cognito-idp admin-delete-user --user-pool-id $COGNITO_USER_POOL_ID --username $uname1; done