Filtering CloudWatch Insights by timestamp with date range

0

Is there a way to filter the date range? See below. It does not work.

fields @timestamp as TimeStamp, @message
| sort @timestamp desc
| filter @timestamp >= '2020-06-01T00:00:00.000+00:00'
and @timestamp <= '2020-06-30T23:59:59.000+00:00'

Also, it will be nice if there is a way to get first date and last date of the current date. In that way, I can put on the filter. Is this possible?

Edited by: destrada on Jun 24, 2020 5:01 PM

asked 4 years ago10045 views
1 Answer
1

Hello,

In the CloudWatch Logs Insights console, in the upper right of the query editor, there is a calendar icon. When you click on the calendar icon, you can select the Absolute tab and input your desired start and end date-times.

If you want to specify a date-range via the API or AWS CLI, you can first save the query, then specify the range as arguments to the start-query method.

Best,
Kevin

AWS
answered 4 years ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions