Last active
July 31, 2019 06:27
-
-
Save DaisukeMiyamoto/75f73aab00314c0a35f1eceb4abb8cee to your computer and use it in GitHub Desktop.
Amazon Cognito CLI utilities
This file contains hidden or 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
#!/bin/bash | |
CLIENT_ID= | |
USERNAME= | |
PASSWORD= | |
aws cognito-idp initiate-auth --auth-flow USER_PASSWORD_AUTH --client-id ${CLIENT_ID} --auth-parameters USERNAME=${USERNAME},PASSWORD=${PASSWORD} |
This file contains hidden or 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
#!/bin/bash | |
ID_TOKEN= | |
ENDPOINT=https://123456789.execute-api.ap-northeast-1.amazonaws.com | |
curl -X POST ${ENDPOINT} -H "Authorization: ${ID_TOKEN}" |
This file contains hidden or 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
#!/bin/bash | |
# add user and reset password to CONFIRMED on Amazon Cognito | |
USERNAME= | |
PASSWORD= | |
USER_POOL_ID= | |
aws cognito-idp admin-create-user --user-pool-id ${USER_POOL_ID} --username ${USERNAME} | |
aws cognito-idp admin-set-user-password --user-pool-id ${USER_POOL_ID} --username ${USERNAME} --password hogehoge --permanent |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment