Zero-Downtime AWS Cognito User Pool Migration (User Migration Lambda Trigger)

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 attem…


This content originally appeared on DEV Community and was authored by Isaac Addis

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

  1. I made sure the event.response.userAttributes object had keys matching the new user pool's signup attributes (with the same exact spelling).
  2. I added ["custom:<attribute name>"] to the event.response.userAttributes response to add custom attributes to a user in the new user pool.


This content originally appeared on DEV Community and was authored by Isaac Addis


Print Share Comment Cite Upload Translate Updates
APA

Isaac Addis | Sciencx (2025-10-04T12:21:27+00:00) Zero-Downtime AWS Cognito User Pool Migration (User Migration Lambda Trigger). Retrieved from https://www.scien.cx/2025/10/04/zero-downtime-aws-cognito-user-pool-migration-user-migration-lambda-trigger/

MLA
" » Zero-Downtime AWS Cognito User Pool Migration (User Migration Lambda Trigger)." Isaac Addis | Sciencx - Saturday October 4, 2025, https://www.scien.cx/2025/10/04/zero-downtime-aws-cognito-user-pool-migration-user-migration-lambda-trigger/
HARVARD
Isaac Addis | Sciencx Saturday October 4, 2025 » Zero-Downtime AWS Cognito User Pool Migration (User Migration Lambda Trigger)., viewed ,<https://www.scien.cx/2025/10/04/zero-downtime-aws-cognito-user-pool-migration-user-migration-lambda-trigger/>
VANCOUVER
Isaac Addis | Sciencx - » Zero-Downtime AWS Cognito User Pool Migration (User Migration Lambda Trigger). [Internet]. [Accessed ]. Available from: https://www.scien.cx/2025/10/04/zero-downtime-aws-cognito-user-pool-migration-user-migration-lambda-trigger/
CHICAGO
" » Zero-Downtime AWS Cognito User Pool Migration (User Migration Lambda Trigger)." Isaac Addis | Sciencx - Accessed . https://www.scien.cx/2025/10/04/zero-downtime-aws-cognito-user-pool-migration-user-migration-lambda-trigger/
IEEE
" » Zero-Downtime AWS Cognito User Pool Migration (User Migration Lambda Trigger)." Isaac Addis | Sciencx [Online]. Available: https://www.scien.cx/2025/10/04/zero-downtime-aws-cognito-user-pool-migration-user-migration-lambda-trigger/. [Accessed: ]
rf:citation
» Zero-Downtime AWS Cognito User Pool Migration (User Migration Lambda Trigger) | Isaac Addis | Sciencx | https://www.scien.cx/2025/10/04/zero-downtime-aws-cognito-user-pool-migration-user-migration-lambda-trigger/ |

Please log in to upload a file.




There are no updates yet.
Click the Upload button above to add an update.

You must be logged in to translate posts. Please log in or register.