You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Unrecognized field "version" in class com.amazonaws.services.lambda.runtime.events.APIGatewayProxyRequestEvent #207
AGW adds the "version" tag regardless of whether its configured for V1 or V2 integration causing the lambda to fail because the "APIGatewayProxyRequestEvent" cannot serialize a "version" property.
So I think, either AGW should be fixed to exclude "version" if configured for V1 or the lambda events package should add the "version" property so that it does not break when deployed. I hope my problem is clear.
It shows that Apigateway will send the "version" property for both V1 and V2 integration types. This is a problem when lambda events library (APIGatewayProxyRequestEvent) does not have the property.
Sorry for the confusing notifications you must be getting. I'm working on this atm and testing the various different scenarios. I'm hoping to sort this out soon.
Activity
msailes commentedon Dec 23, 2020
Hi Alappin,
Are you using version 2 of the API Gateway proxy integration?
If you are that uses a different event which does have
versionhttps://github.com/aws/aws-lambda-java-libs/blob/master/aws-lambda-java-events/src/main/java/com/amazonaws/services/lambda/runtime/events/APIGatewayV2HTTPEvent.java
Mark
Alappin commentedon Dec 24, 2020
Hi @msailes
For my AGW HTTP API, in my code, I am using the (APIGatewayProxyRequestEvent) with the format:
{ "resource": "Resource path", "path": "Path parameter", "httpMethod": "Incoming request's method name", ... }When I test this locally, I send requests with the below form to the lambda container image and this works
{ "path":"/api", "httpMethod": "POST", }However, when I deploy the lambda and have my Version 1 integration set in AGW, I get requests of the form:
{ "version": "1.0", "path":"/api", "httpMethod": "POST", }AGW adds the "version" tag regardless of whether its configured for V1 or V2 integration causing the lambda to fail because the "APIGatewayProxyRequestEvent" cannot serialize a "version" property.
So I think, either AGW should be fixed to exclude "version" if configured for V1 or the lambda events package should add the "version" property so that it does not break when deployed. I hope my problem is clear.
Alappin commentedon Dec 24, 2020
Also checking the documentation on https://docs.aws.amazon.com/apigateway/latest/developerguide/http-api-develop-integrations-lambda.html#http-api-develop-integrations-lambda.proxy-format
It shows that Apigateway will send the "version" property for both V1 and V2 integration types. This is a problem when lambda events library (APIGatewayProxyRequestEvent) does not have the property.
msailes commentedon Dec 24, 2020
Does using v2 fix your problem while a fix is made for v1?
Alappin commentedon Dec 24, 2020
The code I am working with is just a demo for using lambda with containers so I am fine waiting for the fix and then applying it.
msailes commentedon Jul 9, 2021
Hi @Alappin,
Sorry for the confusing notifications you must be getting. I'm working on this atm and testing the various different scenarios. I'm hoping to sort this out soon.
Mark
msailes commentedon Aug 26, 2021
Released in 3.10.0