Skip to content

Cognito User pool migration to another AWS account (with SSO)

0

I want to migrate my Cognito user pool from one AWS account to another for some business related reasons. However for migration I saw that the following url lists the approaches to do the migration and give a detail view on both of those approaches https://aws.amazon.com/blogs/security/approaches-for-migrating-users-to-amazon-cognito-user-pools/

But it doesn't mention anything related to SSO users, so if my Cognito Pool uses a SSO, do all the users in my user pool need to reset password when I use the bulk user import method , when migrated to new Pool and if yes then why ?

1 Answer
2
Accepted Answer

Key Considerations for Migration:

Passwords and MFA Tokens:

Cognito does not allow you to export or import passwords or MFA tokens due to security reasons. This means that users will have to reset their passwords when they are migrated to the new user pool. MFA setup will also have to be reconfigured​ (Cloudar)​ (DEV Community). SSO Users:

If your Cognito user pool integrates with an external SSO provider, those users are authenticated through the SSO provider and not by Cognito itself. When you migrate these users to a new pool and configure the same SSO provider, they should be able to log in without needing to reset their passwords. This is because the authentication happens outside of Cognito​ (Cloudar).

Migration Approaches:

Bulk User Import: You can export users from the old pool and import them into the new one. However, this will require users to reset their passwords, unless they are SSO users.

User Migration Lambda Trigger: Another approach is to use a migration Lambda trigger that imports users into the new pool upon their first sign-in. This allows for a smoother transition, but you'll need to keep the old pool active until all users have migrated​ (DEV Community).

Recommended Steps:

Set Up SSO in the New Cognito Pool:

Configure the same SSO provider in the new Cognito pool to ensure that users authenticated through SSO can continue to log in without disruption.

Communicate with Users:

If you have users who do not use SSO, prepare them for a password reset as part of the migration.

Testing:

Before fully migrating, test the new setup with a small group of users to ensure everything works smoothly.

EXPERT

answered 2 years ago

EXPERT

reviewed 2 years ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.