- Newest
- Most votes
- Most comments
The error indicates that the response returned from the user migration Lambda function is not in the format expected by Amazon Cognito. A few things to check:
-
Make sure the response includes all the required attributes that match the schema of your user pool. The error occurs if an attribute in the response is not defined in the schema.
-
Check that the
username
attribute matches the email attribute value that is being used to authenticate. -
When testing with the CLI, the full response returned from the Lambda function needs to be serialized correctly. Make sure to return all top-level attributes like version , userPoolId , region etc. that were present in the original invocation event.
-
It's difficult to debug further without seeing the actual response. Try minimizing the response to only the required attributes and values to narrow down where it may be failing validation.
-
Verify that the Lambda execution role has sufficient permissions for Amazon Cognito to invoke the function and read the response.
Relevant content
- asked 2 months ago
- asked 2 years ago
- AWS OFFICIALUpdated 4 months ago
- AWS OFFICIALUpdated a year ago
- AWS OFFICIALUpdated a year ago
- AWS OFFICIALUpdated a year ago