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

posta 4 anni fa10427 visualizzazioni
1 Risposta
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
con risposta 4 anni fa

Accesso non effettuato. Accedi per postare una risposta.

Una buona risposta soddisfa chiaramente la domanda, fornisce un feedback costruttivo e incoraggia la crescita professionale del richiedente.

Linee guida per rispondere alle domande