title: AWS Can not deserialize instance of java.lang.String out of START_OBJECT
body: <p>I have made a Lambda Function and I want to access it via URL with a help of the API Gateway. </p>
  
  <p>I have set it all up, I have also created an <code>application/json</code> body mapping template in API Gateway looking like this: </p>
  
  <pre><code>{ 
      "input": "$input.params('input')",
  }
  </code></pre>
  
  <p>And then I am triggering HTTP GET request that looks like this:</p>
  
  <pre><code>https://dmquh95ckh.execute-api.eu-west-1.amazonaws.com/prod/OtoTestFunction?input=test
  </code></pre>
  
  <p>My Java handler class looks like this:</p>
  
  <pre><code>public class LambdaFunctionHandler implements RequestHandler&lt;String, String&gt; {
  
      @Override
      public String handleRequest(String input, Context context) {
          context.getLogger().log("Input: " + input);
          return "Test completed."+input;
      }
  }
  </code></pre>
  
  <p>And this is the full error message:</p>
  
  <pre><code>{
    "errorMessage": "An error occurred during JSON parsing",
    "errorType": "java.lang.RuntimeException",
    "stackTrace": [],
    "cause": {
      "errorMessage": "com.fasterxml.jackson.databind.JsonMappingException: Can not deserialize instance of java.lang.String out of START_OBJECT token\n at [Source: lambdainternal.util.NativeMemoryAsInputStream@68c4039c; line: 1, column: 1]",
      "errorType": "java.io.UncheckedIOException",
      "stackTrace": [],
      "cause": {
        "errorMessage": "Can not deserialize instance of java.lang.String out of START_OBJECT token\n at [Source: lambdainternal.util.NativeMemoryAsInputStream@68c4039c; line: 1, column: 1]",
        "errorType": "com.fasterxml.jackson.databind.JsonMappingException",
        "stackTrace": [
          "com.fasterxml.jackson.databind.JsonMappingException.from(JsonMappingException.java:148)",
          "com.fasterxml.jackson.databind.DeserializationContext.mappingException(DeserializationContext.java:835)",
          "com.fasterxml.jackson.databind.deser.std.StringDeserializer.deserialize(StringDeserializer.java:59)",
          "com.fasterxml.jackson.databind.deser.std.StringDeserializer.deserialize(StringDeserializer.java:12)",
          "com.fasterxml.jackson.databind.ObjectReader._bindAndClose(ObjectReader.java:1441)",
          "com.fasterxml.jackson.databind.ObjectReader.readValue(ObjectReader.java:1047)"
        ]
      }
    }
  }
  </code></pre>