Last active
March 11, 2020 21:22
-
-
Save youngsoul/aba69c3f10f4b2951a2a32f1a3fdfece to your computer and use it in GitHub Desktop.
snippet showing how to use the AWS Cognito client to sign_up to a user pool.
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
resp = client.sign_up( | |
ClientId = os.getenv('CLIENT_ID'), | |
SecretHash=get_secret_hash(email, os.getenv('CLIENT_ID'), os.getenv('CLIENT_SECRET')), | |
Username=email, | |
Password=password, | |
UserAttributes=[ | |
{ | |
"Name": "custom:favorite_band", | |
"Value": favorite_band | |
}, | |
{ | |
"Name":"name", | |
"Value":name | |
} | |
] | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment