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"

feita há 9 meses285 visualizações
1 Resposta
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 há 9 meses

Você não está conectado. Fazer login para postar uma resposta.

Uma boa resposta responde claramente à pergunta, dá feedback construtivo e incentiva o crescimento profissional de quem perguntou.

Diretrizes para responder a perguntas