Question

AWS CloudWatch Logs Insights - export full query result?

I have a CloudWatch Logs Insights query, which shows "7000 records matched", but when I try Actions -> Download query results (CSV), only 1000 records are exported (same as shown in the console). I cannot find any way to export the "full" query results. Am I missing anything?

 46  51065  46
1 Jan 1970

Solution

 7

This is an addition to lznt's answer, addressing the following issue:

if my query has more than 10000 records, there seems to be no way to get the complete data.

I think there is a workaround: You can mess with the time range of the query. Order the results by timestamp. You then know the timestamp of the last record that you still managed to get.

For the next query, set the time range of the query so that you start where the previous query ended.

It is admittedly an ugly, iterative workaround, with a human in the loop.

Disclaimer: I haven't tested it.

2020-04-11