API Gateway and Lambda function in java

Hi @kdrnaik24,
Is there any particular reason you are not using “lambda proxy” integration? If not, then you should :wink:
Edit: I read over that you return an integer. That is probably not possible. Can you try returning a object instead:

public class Response {
  private final int value;
  public Response(int value) {
    this.value = value;
  }
  public int getValue() {
    return value;
  }
}

Also your custom response template looks strange to me (but it’s been a while I’ve been using non-proxy integration)

  1. Shouldn’t it just be: template: $input.path('$')
  2. Shouldn’t template be on the same level as headers?

(+ since you are using Java, some promo for my Java framework JRestless in case you are interested)