- Newest
- Most votes
- Most comments
It may related to missing Required Attributes, even the pool only requires email, Cognito may still expect certain attributes to be present in the response.userAttributes object.
Try including:
userAttributes: {
email: "user@example.com",
email_verified: "true",
username: "migrate"
}
Also consider adding preferred_username or given_name if your original pool used them.
- Incorrect Attribute Format Ensure all attributes are strings and match Cognito's expected format:
- email_verified must be "true" (string), not true (boolean).
- Avoid trailing commas or malformed JSON.
Hey,
Hope you're keeping well.
In a Cognito UserMigration_Authentication trigger, Cognito only creates the user if the Lambda returns userAttributes and sets finalUserStatus and messageAction correctly, but it also requires that the authentication succeeds. You must set response.forceAliasCreation only if migrating aliases, and ensure response.userAttributes includes all attributes required by your pool (matching the exact attribute names, e.g. email instead of username). If your Lambda does not call context.succeed(event) with those populated fields before returning, Cognito will silently skip creation.
Thanks and regards,
Taz
Relevant content
- asked 3 years ago
- asked a year ago

I've tested all combinations of response.userAttributes I could think of that are assigned to old users in the old user pool:
I've double checked by logs to see that email_verified is always a string, not a boolean, and that the response has no trailing commas or malformed JSON syntax. I've also tried to include a response.username variable with many of the combinations listed above since I saw a suggestion that username shouldn't be included in user attributes directly but rather as its own variable in response (although I don't think that's correct and it didn't solve my issue).