title: How to get an alarm when there are no logs for a time period in AWS Cloudwatch?
body: <p>I have a Java application that runs in AWS Elastic Container Service. Application polls a queue periodically. Sometimes there is no response from the queue and the application hanging forever.
  I have enclosed the methods with try-catch blocks with logging exceptions. Even though there are no logs in the Cloudwatch after that. No exceptions or errors.
  Is there a way that I can identify this situation. ? (No logs in the Cloudwatch). Like filtering an error log pattern.
  So I can restart the service. Any trick or solution would be appreciated.</p>
  <pre><code>public void handleProcess() {
      try {
          while(true) {
              Response response = QueueUitils.pollQueue(); // poll the queue
              QueueUitils.processMessage(response);
              TimeUnit.SECONDS.sleep(WAIT_TIME); // WAIT_TIME = 20
          }
      } catch (Exception e) {
          LOGGER.error(&quot;Data Queue operation failed&quot; + e.getMessage());
          throw e;
      }
  }
  </code></pre>