Posted On: Nov 16, 2023

Amazon CloudWatch Logs is excited to announce the ability for customers to use up to two stats commands in a Log Insights query. By increasing the number of stats commands to two in a single query, customers can now use the second stats command to perform aggregations on the results of the first stats operation. For example, customers can aggregate their log traffic over 10-minute intervals using a stats command, and then calculate the maximum traffic across the 10-minute intervals using another stats command in the same query. 

Amazon CloudWatch Logs Insights is a fully integrated, interactive, pay-as-you-go log analytics service for CloudWatch. Logs Insights enables you to explore, analyze, and visualize your logs, allowing you to troubleshoot operational problems with ease. Logs Insights supports queries with aggregations, filters, and regular expressions for analyzing your logs. Customers can now use multiple stats command in a log insights query to generate powerful aggregations.

This feature is now available in all AWS Regions, except AWS China Regions.

To learn more about the new multiple stats command, visit the CloudWatch Logs Query Syntax Guide or select “Query help” from within the CloudWatch Logs Insights console page. To get started with CloudWatch Logs Insights, you can visit our getting started guide and the pricing page to learn more.