title: AWS Lamba constantly receiving empty SQS event messages
body: <p>I'm a relative n00b at AWS, so apologise if this is a stupid question.</p>
  
  <p>I have an AWS Lambda written in Java. I also have an SQS queue that receives AWS S3 event messages. I've then created a Lambda trigger against the SQS queue so that my Lambda receives the S3 events as SQS messages and processes them appropriately.</p>
  
  <p>It all works well. The only issue I have is that it seems like the Lambda is receiving notification of an SQS event message every 2 minutes, even when there are no messages in the SQS queue.</p>
  
  <p>The Java code looks like this:</p>
  
  <pre><code>public class SQSEventHandler implements RequestHandler&lt;SQSEvent, Void&gt; {
      @Override
      public Void handleRequest(SQSEvent sqsEvent, Context context) {
          if (sqsEvent != null) {
              LOGGER.debug("Received SQS event: {}", sqsEvent.toString());
              ... do stuff...
  </code></pre>
  
  <p>If I look in the CloudWatch logs (I log using SLF4J), I can see that the Lambda is triggered with different SQS messages every 2 minutes, even during periods when there are no S3 event messages to process:</p>
  
  <pre><code>02:54:16 START RequestId: d5454080-8ea3-4c44-93e9-caa5bd903599 Version: $LATEST
  02:54:16 [2020-02-13 02:54:16.220] - [d5454080-8ea3-4c44-93e9-caa5bd903599] DEBUG &lt;package&gt;.SQSEventHandler - Received SQS event: {}
  02:54:16 END RequestId: d5454080-8ea3-4c44-93e9-caa5bd903599
  02:54:16 REPORT RequestId: d5454080-8ea3-4c44-93e9-caa5bd903599 Duration: 1.05 ms Billed Duration: 100 ms Memory Size: 512 MB Max Memory Used: 161 MB
  02:56:16 START RequestId: 9d5acbba-b96c-47e9-81c2-2d448e4ca6e9 Version: $LATEST
  02:56:16 [2020-02-13 02:56:16.386] - [9d5acbba-b96c-47e9-81c2-2d448e4ca6e9] DEBUG &lt;package&gt;.SQSEventHandler - Received SQS event: {}
  02:56:16 END RequestId: 9d5acbba-b96c-47e9-81c2-2d448e4ca6e9
  02:56:16 REPORT RequestId: 9d5acbba-b96c-47e9-81c2-2d448e4ca6e9 Duration: 1.23 ms Billed Duration: 100 ms Memory Size: 512 MB Max Memory Used: 161 MB
  02:58:16 START RequestId: 54bc4fa4-bcaf-4834-9185-09c9c7e2d757 Version: $LATEST
  02:58:16 [2020-02-13 02:58:16.451] - [54bc4fa4-bcaf-4834-9185-09c9c7e2d757] DEBUG &lt;package&gt;.SQSEventHandler - Received SQS event: {}
  02:58:16 END RequestId: 54bc4fa4-bcaf-4834-9185-09c9c7e2d757
  02:58:16 REPORT RequestId: 54bc4fa4-bcaf-4834-9185-09c9c7e2d757 Duration: 1.01 ms Billed Duration: 100 ms Memory Size: 512 MB Max Memory Used: 161 MB
  </code></pre>
  
  <p>There are no other SQS queues with triggers to this Lambda.</p>
  
  <p>As you can see, the SQS event object isn't null but doesn't produce anything in the toString() call.</p>
  
  <p>I can't work out what the issue is - any assistance would be appreciated.</p>