Monitoring and Logging

Athena queries S3 logs partitioned by UTC ingestion date, and events arrive between zero and 48 hours after their event timestamps. An engineer must retrieve every event from July 1 UTC while minimizing scanned partitions; which predicates should the query use?

Show the answer

Correct answerC. Filter event timestamps to July 1 and ingestion partitions to July 1–3.

AWhy not this: The timestamp filter selects the correct events but does not explicitly prune ingestion-date partitions.

BWhy not this: Restricting ingestion to July 1 excludes July 1 events that arrive on July 2 or July 3.

CWhy this is right: The partition range includes all permitted arrivals, and the timestamp filter selects only July 1 events.

DWhy not this: These partitions also contain events whose event timestamps fall outside July 1.

July 1 events can arrive in ingestion partitions for July 1, 2, or 3. Filtering those partitions enables pruning, while the event timestamp predicate excludes events from other days; filtering only the July 1 partition would miss late arrivals.