Skip to content

Failed to serialize CognitoUserPoolPreTokenGenerationEvent #433

Closed
@NikolayMetchev

Description

@NikolayMetchev

Hello,
I am trying to use cognito and a java pre-token generation event lambda https://docs.aws.amazon.com/cognito/latest/developerguide/user-pool-lambda-pre-token-generation.html

I wrote a lambda and used the following class as my lambda definition: com.amazonaws.services.lambda.runtime.RequestHandler<com.amazonaws.services.lambda.runtime.events.CognitoUserPoolPreTokenGenerationEvent, com.amazonaws.services.lambda.runtime.events.CognitoUserPoolPreTokenGenerationEvent>

this doesn't seem to be able to parse the input at all and I get the following output in the logs:

CognitoUserPoolPreTokenGenerationEvent(request=CognitoUserPoolPreTokenGenerationEvent.Request(clientMetadata=null, groupConfiguration=CognitoUserPoolPreTokenGenerationEvent.GroupConfiguration(groupsToOverride=[us-east-1_IWxv0Zfr1_Test], iamRolesToOverride=[], preferredRole=null)), response=CognitoUserPoolPreTokenGenerationEvent.Response(claimsOverrideDetails=null))

If however I use com.amazonaws.services.lambda.runtime.RequestStreamHandler I do in fact see the correct input in the lambda log. Please help

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions