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"

preguntada hace 9 meses286 visualizaciones
1 Respuesta
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
respondido hace 9 meses

No has iniciado sesión. Iniciar sesión para publicar una respuesta.

Una buena respuesta responde claramente a la pregunta, proporciona comentarios constructivos y fomenta el crecimiento profesional en la persona que hace la pregunta.

Pautas para responder preguntas