owenr88 / cognito-migrator Goto Github PK
View Code? Open in Web Editor NEWMigrate users from one Cognito user pool to another
Home Page: https://github.com/owenr88/cognito-migrator
Migrate users from one Cognito user pool to another
Home Page: https://github.com/owenr88/cognito-migrator
Currently the following method will return a type-safe object of all standard attributes, but custom attributes are not typed.
const attributes = parseUserAttributes<{ "custom:thing": z.ZodString }>
With the above attributes['custom:thing']
currently throws an error - this shouldn't be the case.
// TODO: Validate the import schema with the custom attributes in the parent class
Hi, I am trying to use your tool.
But I am not able to export the list of users due to a verification failure with email_verified
using [email protected]
Although the documentation only mention the use of true
as value, it is apparently possible to define both true
and True
in the attributes email_verified
and phone_number_verified
.
At least I am using both without problems in my user pool.
[cloudshell-user@ip-1-2-3-4]$ npx cognito-export -u us-east-1_aaaaaaaaaaaaa -v
Need to install the following packages:
[email protected]
Ok to proceed? (y) y
Using profile: default
Using region: us-east-1
Found user pool
[
{
"code": "invalid_union",
"unionErrors": [
{
"issues": [
{
"received": "True",
"code": "invalid_literal",
"expected": "true",
"path": [
"email_verified"
],
"message": "Invalid literal value, expected \"true\""
}
],
"name": "ZodError"
},
{
},
{
"issues": [
{
"received": "True",
"code": "invalid_literal",
"expected": "false",
"path": [
"email_verified"
],
"message": "Invalid literal value, expected \"false\""
}
],
"name": "ZodError"
}
],
"path": [
"email_verified"
],
"message": "Invalid input"
}
]
No users found
// TODO: We know the data type of the custom attribute, so we should validate against it
Hello @owenr88 i hope you are doing well!!
Once again, thank you for the tool, it is very useful.
I updated the tool and I am using it with npx, at this moment I exported the users but a custom attribute was missing, I don't know the exact reason why it was missing. When importing it gives me an error indicating that this attribute is missing, cognito expects 24 and in csv it only managed to export 23.
I'll leave you some cloudwatch logs.
Miss user pool expected header - [custom:clients]
File headers total count 23, expected headers total count 24
This is how i have my custom attributes:
The attributes custom:databaseUserId and custom:roles are exported correctly
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.