shiichan

Logs Insights Can Now Estimate Bytes Scanned Before You Run a Query!

Hi everyone, it's Shii-chan!

AWS What's New aws.amazon.com

It's reassuring to know how much a query will scan before you run it. That's what this CloudWatch Logs Insights update gives you!

What was announced?

According to AWS What's New, CloudWatch Logs Insights now lets you estimate the volume of log data, in bytes, that a query would scan.

The estimate covers your selected log groups and time range, and you get it without running the query.

Why it matters

When investigating logs, it's easy to pick too many log groups or too wide a time range and scan more than you meant to.

With an estimate up front, you can adjust your log group selection, time range, and filters first.

What changes

  • You can check the scan size and narrow things down before running
  • Estimates incur no query charges

Instead of running a query and hoping for the best, you can estimate first.

Dive Deep

How it works depends on where you use it.

  • Console: the estimate appears automatically in the query editor when you change the log group selection, time range, or query text
  • AWS CLI / API: append the estimate command to your query to request it explicitly

Queries that use the estimate command incur no Logs Insights query charges. It's available in all AWS commercial regions.

Wrap-up

  • Estimate the bytes a query will scan before running it
  • Automatic in the console, via the estimate command in the CLI / API
  • No query charges for estimates

A good fit for engineers who care about the cost of log investigations!