Created
May 30, 2018 06:12
-
-
Save iampeterbanjo/e51d759710690a0be52ad9854c002160 to your computer and use it in GitHub Desktop.
AWS change user password using CLI
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# https://stackoverflow.com/a/45253010/95055 | |
# Step 1: Get a session token for the desired user: | |
aws cognito-idp admin-initiate-auth --user-pool-id %USER POOL ID% --client-id %APP CLIENT ID% --auth-flow ADMIN_NO_SRP_AUTH --auth-parameters USERNAME=%USERS USERNAME%,PASSWORD=%USERS CURRENT PASSWORD% | |
# Step 2: Issue the challenge response: | |
aws cognito-idp admin-respond-to-auth-challenge --user-pool-id %USER POOL ID% --client-id %CLIENT ID% --challenge-name NEW_PASSWORD_REQUIRED --challenge-responses NEW_PASSWORD=%DESIRED PASSWORD%,USERNAME=%USERS USERNAME% --session %SESSION KEY FROM PREVIOUS COMMAND with ""% |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment