- Newest
- Most votes
- Most comments
Hello!
This error may occur due to following reasons stated below :
(a) Check if username and password are correct : ————————————————————————————
Keep a track whether the AuthParameters in the code is configured correctly with correct username and password. [1]
AuthParameters={
'USERNAME': event['userName'],
'PASSWORD': event['request']['password']
}
Also in password only use the following special characters [2] :
^ $ * . [ ] { } ( ) ? " ! @ # % & / \ , > < ' : ; | _ ~ ` = + -
The space character is also treated as a special character.
(b) Is the customer authenticating against the old user pool and old client ID ? ————————————————————————————————————
Confirm if the code present inside the lambda trigger is authenticating the user against the old userpoolID and ClientID (where the user belongs).
UserPoolId='<user pool id of the user pool where the user already exists>',
ClientId='<app client id of the user pool where the user already exists>',
Please review the logic of your code, so as to achieve the expected results with the code mentioned under section ”Create a Lambda function” of documentation [1] and check if there are any errors.
You can check Lambda execution log for troubleshooting the Lambda code by using following steps [3] :
(i) Open the Functions page of the Lambda console.
(ii) Choose a function.
(iii) Choose Monitor.
(iv) Choose View logs in CloudWatch.
References:
———————
[1] https://aws.amazon.com/premiumsupport/knowledge-center/cognito-change-user-pool-attributes/
[2] Password Policy- https://docs.aws.amazon.com/cognito/latest/developerguide/user-pool-settings-policies.html
[3] Accessing Amazon CloudWatch logs for AWS Lambda https://docs.aws.amazon.com/lambda/latest/dg/monitoring-cloudwatchlogs.html
Relevant content
- asked 10 months ago
- asked 8 months ago
- AWS OFFICIALUpdated 2 years ago
- AWS OFFICIALUpdated 4 months ago
- AWS OFFICIALUpdated a year ago
- AWS OFFICIALUpdated a year ago