POST always requiring a query param

I deployed a lambda (java 8) a few weeks ago.

Last week I deployed a new version of that lambda with very minor code changes and the same yml configuration and my POST methods started to die with:

java.lang.NullPointerException at com.amazonaws.serverless.proxy.internal.servlet.AwsProxyHttpServletRequest.getRemoteAddr(

It took me while to try and add a random query param /mymethod?xyz=123 which made my requests work as they used to.

Is anybody aware of any change on AWS side? I have serverless v1.27.3 but this hasn’t changed between deployments.


`service: mylambda

timeout: 30
memorySize: 2048
name: aws
runtime: java8
DYNAMODB_TABLE: {self:service}-{opt:stage, self:provider.stage}
- Effect: Allow
- dynamodb:Query
- dynamodb:Scan
- dynamodb:GetItem
- dynamodb:PutItem
- dynamodb:UpdateItem
- dynamodb:DeleteItem
Resource: “arn:aws:dynamodb:{opt:region, self:provider.region}:*:table/{self:provider.environment.DYNAMODB_TABLE}”

region: eu-west-1

artifact: target/mylambda-1.0.0-SNAPSHOT.jar

handler: com.mylambda.lambda.LambdaHandler
- http:
path: /{proxy+}
method: post`

The springboot controller hasn’t changed between deployments and doesn’t ask for a query param.

It may be different with Java but the event for the Javascript handler contains null instead of an empty object when there are no query parameters. Is it possible you’ve got code somewhere that doesn’t take that into consideration?

No, there’s nowehere in my code where I can handle null query params.

Actually I forgot to say that when I run the lambda on localhost without adding a query param I get no error, the function executes without a problem.

It’s only when deployed that I get an NPE