Open
Description
Other Cognito event structs look like:
type CognitoEventUserPoolsPostAuthentication struct {
CognitoEventUserPoolsHeader
Request CognitoEventUserPoolsPostAuthenticationRequest `json:"request"`
Response CognitoEventUserPoolsPostAuthenticationResponse `json:"response"`
}
But CognitoEventUserPoolsMigrateUser
is defined as:
type CognitoEventUserPoolsMigrateUser struct {
CognitoEventUserPoolsHeader
CognitoEventUserPoolsMigrateUserRequest `json:"request"`
CognitoEventUserPoolsMigrateUserResponse `json:"response"`
}
So instead of event.Response.UserAttributes
you have to do either event.UserAttributes
or event.CognitoEventUserPoolsMigrateUserResponse.UserAttributes
which both look a bit weird to me and is a bit inconsistent with the other event definitions?
Is this intentional or just a miss?
My suggestion is to change the definition to:
type CognitoEventUserPoolsMigrateUser struct {
CognitoEventUserPoolsHeader
Request CognitoEventUserPoolsMigrateUserRequest `json:"request"`
Response CognitoEventUserPoolsMigrateUserResponse `json:"response"`
}