Skip to content

Instantly share code, notes, and snippets.

@youngsoul
Last active March 11, 2020 21:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save youngsoul/aba69c3f10f4b2951a2a32f1a3fdfece to your computer and use it in GitHub Desktop.
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.
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