1

I have a cloudwatch log in the following format

id name city
1 John
1 New York
2 Seatle
2 Mike

I am looking for a way to fetch log data in the following format combining empty and non-empty values

id name city
1 John New York
2 Mike Seatle

How can I achieve this using CloudWatch log filter query?

stackmj18
  • 103
  • 2
  • 12

1 Answers1

0

I don't think that's possible at the moment with just CloudWatch. There's nothing in the log insights functions that would do that.

You could try analyzing your logs in Athena, but that does add cost and complexity. You can use the CloudWatch / Athena connector which would let you query logs with SQL. Alternatively you could export the logs to S3 for further analysis.