AtlasOfLivingAustralia/userdetails

Cognito - Lambda to migrate users

sat01a opened this issue · 1 comments

Cognito - Lambda to migrate users

Migrate the user field and property map to Cognito attributes:

The current roles can be migrated across to Cognito groups.
There is not way to migrate groups using the Cognito user migration lambda process, however the roles can be migrated using another lambda that is triggered pre_token_generation. This should check if there are is a different between the Cognito user's groups and the old roles, if there is then add the user to the relevant groups.

User fields

Field Cognito attribute
userId
firstName given_name
lastName family_name
userName
email email
dateCreated
lastUpdated updated_at
lastLogin
activated
locked

User properties (name value pairs)

Property Count Deprecate
adminNote 8905
affiliation 28637
ala-hub.download_saved_fields 91
ala-hub.hub_charts.chart 8
ala-hub.user_facets 1
avh-hub.download_saved_fields 2
biocache-hub.user_facets 1
bulkCreatedOn 1109
city 147702
country 147682
flickrId 390
flickrUsername 390
inaturalistId 1451
inaturalistToken 1451
inaturalistUsername 1451
newsletterSubscription 1591
null.download_saved_fields 195
null.hub_charts.chart 9
null.hub_charts.dqUserProfile 119
organisation 146473
primaryUserType 57116
secondaryUserType 55625
state 147682
telephone 55607 Y