title: Configure Objectmapper used by Java AWS Lambda
body: <p>I am trying to develop an AWS Lambda function that is triggered by events from SQS.</p>
  
  <p>I am using the <em>spring-cloud-function-adapter-aws</em> (version 1.0.0.RELEASE) and in specifically a <em>SpringBootRequestHandler</em>.</p>
  
  <p>However, the ObjectMapper that is being used is case-sensitive and therefore failing to successful convert the Json coming from SQS.</p>
  
  <p>SQS publishes the following Json and it is the <strong>Records</strong> field in particular that I'm having the problem with.</p>
  
  <pre><code>    {
    "Records": [
      {
        "body": "Hello from SQS!",
        "receiptHandle": "MessageReceiptHandle",
        "md5OfBody": "7b270e59b47ff90a553787216d55d91d",
        "eventSourceARN": "arn:aws:sqs:eu-west-1:123456789012:MyQueue",
        "eventSource": "aws:sqs",
        "awsRegion": "eu-west-1",
        "messageId": "19dd0b57-b21e-4ac1-bd88-01bbb068cb78",
        "attributes": {
          "ApproximateFirstReceiveTimestamp": "1523232000001",
          "SenderId": "123456789012",
          "ApproximateReceiveCount": "1",
          "SentTimestamp": "1523232000000"
        },
        "messageAttributes": {}
      }
    ]
  }
  </code></pre>
  
  <p>I have tried the suggestions in this question, but to no avail. <a href="https://stackoverflow.com/questions/7854030/configuring-objectmapper-in-spring">Configuring ObjectMapper in Spring</a></p>
  
  <p>In my POJO, I've also added the below annotation but it isn't working either whilst it would outside of Lambda.</p>
  
  <pre><code>@JsonProperty("Records")
  private List&lt;SqsRecord&gt; Records;
  </code></pre>
  
  <p>Any help would be much appreciated.</p>
  
  <p>My Lambda handler is defined as:</p>
  
  <pre><code>public class SqsEventHandler extends SpringBootRequestHandler&lt;SqsEvent, String&gt; {}
  </code></pre>
  
  <p>The POJO defined as:</p>
  
  <pre><code>public class SqsEvent {
  
  @JsonProperty("Records")
  private List&lt;SqsRecord&gt; records;
  
  @Data
  public class SqsRecord {
      private String body;
      private String receiptHandle;
      private String md5OfBody;
      private String eventSourceARN;
      private String eventSource;
      private String awsRegion;
      private String messageId;
  }
  </code></pre>
  
  <p>}</p>
  
  <p>I expect the Json from the sample message to be able to be read in by the ObjectMapper, but the field "records" is null.</p>