Overview
Using the User Migration Lambda Trigger on a new Cognito user pool enables users to sign-in to a new user pool without having to create a new account or reset their password. The User Migration Lambda runs after failed sign-in attempts and attempts to sign in users against the old user pool during a migration. Following an open-source repository, this blog will guide how to migrate users to a new user pool.
Link to the repository
https://github.com/Collaborne/migrate-cognito-user-pool-lambda
Changes I made to the repository
- I made sure the
event.response.userAttributes
object had keys matching the new user pool's signup attributes (with the same exact spelling). - I added
["custom:<attribute name>"]
to theevent.response.userAttributes
response to add custom attributes to a user in the new user pool.
Top comments (0)