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"

질문됨 9달 전288회 조회
1개 답변
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
답변함 9달 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠