Exclude duplicate log records in cloudwatch insights query and then do stats

0

Currently am facing an issue when trying to get rid of duplicate log records in cloudwatch log-group/stream when doing my query in insights. I have come across the new "dedup" feature AWS launched, but it seems useless for my case. I want to remove duplicates before performing any "stats" related functions.

Cloudwatch query syntax throws errors stating that dedup can only be used after "stats". Whats the point of it, if am just doing "stats" operations on duplicate records as it will skew up my metrics and i see incorrect results.

error - "Compile Error - Dedup cannot be used before stats (Service: AWSLogs; Status Code: 400; Error Code: MalformedQueryException; Request ID: ff4c193e-e931-4028-9e1a-192c6fb41519; Proxy: null)"

No Answers

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions