CloudTrail Lake Conditions

0

I have a CloudTrail Lake and using the following conditions but not getting any all the results event though I know that there are API calls made those days. Please advise.

WHERE eventTime >= '2023-05-05 00:00:00' AND eventTime <= '2023-05-06 00:00:00'

질문됨 10달 전228회 조회
1개 답변
2
수락된 답변

The eventTime consists of date and time. In your example condition, you are using '2023-05-05 00:00:00' and that includes the date and the time. Using your condition, the result set will only include events between '2023-05-05 00:00:00' and '2023-05-06 00:00:00' (meaning not including '2023-05-06 00:00:01' to '2023-05-06 23:59:59')

If you would like to filter for the whole day of the range, consider including the time. Eg:

WHERE eventTime >= '2023-05-05 00:00:00' AND eventTime <= '2023-05-06 23:59:59'

Or consider removing the time in your condition like the example below.

DATE_FORMAT(eventTime, '%Y%m%d') >= ‘20230505’ AND DATE_FORMAT(eventTime, '%Y%m%d') <= ‘20230506’

profile pictureAWS
전문가
답변함 10달 전
profile pictureAWS
전문가
검토됨 10달 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인