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

已提問 4 年前檢視次數 10425 次
1 個回答
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
已回答 4 年前

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南