I have AWS API Gateway with two resources:
/api/orders
/api/history
And I have enabled CloudWatch logs for that API. Using AWS CloudWatch Logs Insights I'm able to collect and observe logs from log groups related to the mentioned API. I'd like to analyze the traffic which goes through the API using collected logs and determine how many requests were made to each API resource.
How can I group log records from my API by resource name and aggregate some data (for example, calculate count of requests for each resource) using Logs Insights?