Have you ever opened the "Queries" tab in the Amazon CloudWatch Logs Insights console? While we can save existing queries, would it not be nice to have them defined as code?
This repo contains two sample applications. One deployed using AWS CDK one using AWS SAM. Both of them show you how to declare Amazon CloudWatch Logs Insights queries as code.
For deployment instructions, refer to the README.md
in a given directory.