Skip to content

Commit

Permalink
10361: only call admin-disable-user if we were able to find the user'…
Browse files Browse the repository at this point in the history
…s cognito id
  • Loading branch information
jimlerza committed May 15, 2024
1 parent f5631a2 commit 2768ac5
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions scripts/user/disable-cognito-user.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,6 @@ USER_COGNITO_ID=$(aws cognito-idp list-users --user-pool-id "$COGNITO_USER_POOL"
| tr -d '"' \
)

[[ -z "$USER_COGNITO_ID" ]] && echo "No user found with the provided custom:userId" && exit 1

aws cognito-idp admin-disable-user --user-pool-id "$COGNITO_USER_POOL" --username "$USER_COGNITO_ID"

0 comments on commit 2768ac5

Please sign in to comment.