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

demandé il y a 4 ans10427 vues
1 réponse
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
répondu il y a 4 ans

Vous n'êtes pas connecté. Se connecter pour publier une réponse.

Une bonne réponse répond clairement à la question, contient des commentaires constructifs et encourage le développement professionnel de la personne qui pose la question.

Instructions pour répondre aux questions