Hello everyone. Is there a way to import users fro...
# sst
i
Hello everyone. Is there a way to import users from an existing cognito user pool to a new one using
SST
?
o
If you want to use the auth construct you can use this example: https://docs.serverless-stack.com/constructs/Auth#importing-an-existing-user-pool Otherwise you can use a raw UserPool directly from CDK
i
@Omi Chowdhury Done but unfortunately users haven't been imported
it doesn't work
o
oh you mean copy the users over…I think you’ll have to write soe code to run a migration. Similar strategy to a db migration
i
Well...I found some tools how to export users from an existing pool but have no idea to to import them into a new one
a
Note that any export will not include passwords. All users will have to go through a forgot password flow to regain access.
i
@Adam Fanello Yeah, I know. This is not a problem. But the main problem remains...
b
Useful package which includes backing up users and groups: https://github.com/mifi/cognito-backup
i
@Brett Fieber Yeah, I saw it. But it doesn't support
csv
and bad work with JSON
b
Unless you're planning to massage the data between backup & restore, does it really matter what the interim data format is?
i
You are right. I mean if we talk about full covering of the issue: backup & transmit users to another pool, then it doesn't work