Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

232
Views
Migrating Users from one AWS Cognito Pool to another keeping the CognitoId/Sub value

A recent-ish release of AWS Cognito has now allowed for case insensitivity for username input however you can't enable it on a current User Pool and requires to create a new User Pool and then migrate the users to it...

So, I've created a new user pool and have a Migration lambda working successfully but I've hit one final issue. We use the CognitoId as a Primary Key within our other systems and now when I migrate the from UserPool A to UserPool B, it creates a new CognitoId and it doesn't seem possible (from what I can see) to manually set the CognitoId / Sub as the value from the previous pool in the new pool.

Has anyone come across this before and have a work around as it's not easily feasible to update all references to a new key. (The new CognitoId isn't returned to any function in the process either)

over 4 years ago · Santiago Trujillo
1 answers
Answer question

0

Cognito Sub is generated internally by the service when the user is created. It is immutable and cannot be assigned a new value. One approach to store "sub" from the old userpool could be to store it in a custom attribute of new userpool. You can check for the custom attribute claim in the ID token to access the user data from your existing system.

Custom attribute is only available in Cognito ID token. If you are currently using Cognito access token with your other systems, this approach won't work for you.

over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!