I have manually created from aws console a CloudWatch Dashboard which contains few widgets from Log Insights Queries. I want to create the same using code (mainly using serverless package). I have found only this serverless plugin related to cloudwatch dashboard, but it does not create dashboard using log insight query. This AWS CloudWatch Code Example also does not show how we can do the same.
I'm using Typescript for the project
Query Exmaple:
fields @timestamp, @message
| filter @message like /REQUEST_ID_GOES_HERE/