Lambda Exception

0

We are using customauth for cognito for verify auth challenge lambda we are using below handler

public CognitoUserPoolVerifyAuthChallengeResponseEvent handleRequest(CognitoUserPoolVerifyAuthChallengeResponseEvent cognitoUserPoolVerifyAuthChallengeResponseEvent, Context context)

we are getting the below error "An error occurred during JSON parsing: java.lang.RuntimeException java.lang.RuntimeException: An error occurred during JSON parsing Caused by: java.io.UncheckedIOException: com.amazonaws.lambda.thirdparty.com.fasterxml.jackson.databind.exc.MismatchedInputException: Cannot construct instance of java.util.LinkedHashMap (although at least one Creator exists): no String-argument constructor/factory method to deserialize from String value"

demandé il y a 9 mois285 vues
1 réponse
0

Hi, Can you check the json structure passed in the CognitoUserPoolVerifyAuthChallengeResponseEvent.Request? The request should be in the format { "request": { "userAttributes": { "string": "string", . . . }, "privateChallengeParameters": { "string": "string", . . . }, "challengeAnswer": "string", "clientMetadata": { "string": "string", . . . }, "userNotFound": boolean }, "response": { "answerCorrect": boolean } }.

The json object "privateChallengeParameters" is usually generated in the previous Create auth challenge lambda. Pls verify that structure is getting generated correctly along with the structure of the entire request. Please refer to the following links for further details. https://docs.aws.amazon.com/cognito/latest/developerguide/cognito-user-identity-pools-working-with-aws-lambda-triggers.html

https://javadoc.io/static/com.amazonaws/aws-lambda-java-events/3.11.0/com/amazonaws/services/lambda/runtime/events/CognitoUserPoolVerifyAuthChallengeResponseEvent.Request.html

AWS
Joyanta
répondu il y a 9 mois

Vous n'êtes pas connecté. Se connecter pour publier une réponse.

Une bonne réponse répond clairement à la question, contient des commentaires constructifs et encourage le développement professionnel de la personne qui pose la question.

Instructions pour répondre aux questions