aws / aws-lambda-java-libs

Official mirror for interface definitions and helper classes for Java code running on the AWS Lambda platform.

Home Page:https://aws.amazon.com/lambda/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

APIGatewayProxyRequestEvent$RequestIdentity missing "cognitoAmr" field

tatsianahren opened this issue · comments

Could you pls add "cognitoAmr" to APIGatewayProxyRequestEvent$RequestIdentity?

API gateway request failed with the following:

Caused by: com.fasterxml.jackson.databind.exc.UnrecognizedPropertyException: Unrecognized field "cognitoAmr" (class com.amazonaws.services.lambda.runtime.events.APIGatewayProxyRequestEvent$RequestIdentity), not marked as ignorable (13 known properties: "sourceIp", "cognitoAuthenticationType", "apiKey", "cognitoIdentityPoolId", "accountId", "cognitoIdentityId", "caller", "principalOrgId", "userArn", "cognitoAuthenticationProvider", "accessKey", "user", "userAgent"])

You must be using an HTTP API (rather than a Rest API). If that's the case, you should use a different class to handle the event. APIGatewayV2HTTPEvent will handle that field correctly.

@tatsianahren does this solve your problem?