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
When processing an invocation from an HTTP API Gateway, the APIGatewayV2HTTPEvent does not appear to deserialize nested objects. These objects are successfully deserialized when using Map<String,Object>.
Note: this is different from #432, although may have the same root cause.
Taking a look at the raw JSON data (via reading as InputStream), I wonder if this class is intended to handle the request from my integration: it's missing several top-level attributes, and has different names for others. However, I see that APIGatewayV2ProxyRequestEvent, which I would have thought a better choice, is deprecated and was intended to support WebSocket requests.
When processing an invocation from an HTTP API Gateway, the
APIGatewayV2HTTPEvent
does not appear to deserialize nested objects. These objects are successfully deserialized when usingMap<String,Object>
.Note: this is different from #432, although may have the same root cause.
Buildable project attached
aws-lambda-java-core
version: 1.2.3aws-lambda-java-events
version: 3.11.5Java target version: 11
Java runtime version: 21
Runtime ARN:
arn:aws:lambda:us-east-1::runtime:02ff9a81932ab0e699171762afcb5aa2f8c2524ac6e34498612b55defb9c2e7f
HTTP gateway configuration (extract from CloudFormation template):
Invocation command:
Version 1: uses
APIGatewayV2HTTPEvent
Output from first
println()
, with account number and GW endpoint redacted, but no other formatting. Note the fields that shownull
values:Output from second
println()
(attempting to retrieve the HTTP invocation information) isnull
.Version 2: uses
Map<String,Object>
Output from this version (again, with identifying information redacted, but otherwise unchanged). Note that child objects are populated:
The text was updated successfully, but these errors were encountered: