Posted On: Jun 20, 2023

Amazon CloudWatch Logs is excited to announce a new Logs Insights command, dedup, which enables customers to eliminate duplicate results when analyzing logs. Customers frequently want to query their logs and view only unique results based on one or more fields. You can now use the new dedup command in your Amazon CloudWatch Logs Insights queries to view unique results based on one or more fields. For example, you can view the most recent error message for each hostname by executing the dedup command on the hostname field.

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 analyze results relevant to their investigation by using the Log Insights dedup command to remove duplicates.

This feature is now supported in all AWS Regions where CloudWatch Logs is available. 

To learn more about the new dedup command, visit the CloudWatch Logs Query Syntax Guide or select “Query help” from within the CloudWatch Log Insights console page. With a few clicks in the AWS Management Console, you can start using CloudWatch Logs Insights to query logs sent to CloudWatch. To get started with CloudWatch Log Insights, you can visit our getting started guide and the pricing page to learn more.