Migrating users from one Cognito User Pool to another (even different AWS Accounts)

Eni Sinanaj
2 min readDec 28, 2023

I needed to move recently a bunch of users from one user pool in an AWS Account to a different user pool in a different account.

It is quite challenging as there are a lot of configurations to do. Especially when it comes to switching the user pool used by the applications. On a frontend app for instance, I got some help from Amplify (https://aws.amazon.com/amplify/) and after a lot of configurations and some options missing that I had to change manually I managed to set it up.

By the way, keep in mind that if your source Cognito User Pool is configured with case sensitive usernames, your target User Pool has to be configured the same way. Otherwise the users will be all stored in lowercase characters (which is different for the end user). This change has to be done manually after initializing the app with amplify ( amplify init ) and after adding the authentication configuration ( amplify auth add). The file called cli-inputs.json contains a property relative to the casing configuration in the username: "usernameCaseSensitive": true|false . There is no command-line interface for changing this property and after you have created the User Pool this cannot be changed anymore.

Once the new User Pool in the eventual new AWS Account is created, be sure to…

--

--

Eni Sinanaj

him/him and stuff… :) Engineer, Business Development, Management, Writer #diy #automation #digitalizationftw