#TIL 6 - Delete all users from AWS Cognito
#!/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