title: Filter by timestamp query on AWS Cloudwatch Logs Insights
body: <p>I am trying to use AWS Cloudwatch Logs insights in order to search in some quite old logs of our lambda functions. I am reading <a href="https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/AnalyzingLogData.html" rel="noreferrer">this guide on AWS docs</a>, but nowhere is documented how you can filter by timestamp. I have tried the below:</p>
  
  <pre><code>fields @timestamp, @message
  | filter @timestamp &gt; '2019-12-04T18:09:10.000+01:00'
  | limit 200
  | sort @timestamp desc
  </code></pre>
  
  <p>but doesn't work (returns 0 results).</p>
  
  <p>Initially, I was trying to find out if there is a way to sort the log groups by a timestamp column (instead of the default which is the log group name), when I came across <a href="https://forums.aws.amazon.com/thread.jspa?threadID=169839" rel="noreferrer">this feature request since 2015</a> - this is not resolved in eu-west-1 and they suggest to use the new log insights, but I can't make this work.</p>
  
  <p>Does anyone know how I can filter logs by timestamp, or if this is even possible with Cloudwatch logs insights?</p>
  
  <p>Thanks!</p>