12

I currently have a mobile application using Firebase for user authentication and storing data.

I would like to migrate from Firebase to AWS. Exporting the DB from Firebase is simple enough. Download the JSON export and populate AWS.

How do I migrate user authentication to Cognito?

3
  • Are you asking how you can migrate the actual users (meaning, add the users to a Cognito User Pool) or what do you have to do after that step?
    – Vladimir
    Commented Apr 6, 2018 at 2:13
  • @Vladimir user passwords, thats the issue with the migration.
    – safaiyeh
    Commented Apr 7, 2018 at 6:37
  • 1
    As @Ashan mentioned, you can follow the one-by-one migration plan listed in the linked blog post.
    – Vladimir
    Commented Apr 8, 2018 at 3:54

2 Answers 2

9

There are multiple ways to migrate users to AWS Cognito. A couple approaches are:

  • Import users as batches. This will require you to take users in to the forget password flow.
  • Onboard users to Cognito UserPools one at a time. This approach requires you to write some code to check against Cognito if the user exists and if not to authenticate users from the Firebase endpoint and if authenticated correctly save the credentials in Cognito UserPools using Cognito AdminAuth API.

For more details, refer the article from AWS, Migrating Users to Amazon Cognito User Pools.

1
  • The article was very helpful. I decided to use the 2nd option.
    – safaiyeh
    Commented Apr 9, 2018 at 18:00
4

You can use the User Migration Lambda Trigger.

https://docs.aws.amazon.com/cognito/latest/developerguide/user-pool-lambda-migrate-user.html

Not the answer you're looking for? Browse other questions tagged or ask your own question.