# CloudWatch Logs Insights query examples

Copy-paste CloudWatch Logs Insights queries for Lambda, API Gateway, VPC Flow Logs and CloudTrail, explained line by line.

20 guides

Diagram: Example diagrams from the Logs Insights queries guides: VPC Flow Logs rejected traffic in Logs Insights; Top IP addresses…

- [API Gateway 5xx errors with Logs Insights](https://cloudconsole.dev/logs-insights/api-gateway-5xx-errors)
- [bin() in CloudWatch Logs Insights](https://cloudconsole.dev/logs-insights/bin-time-series)
- [CloudTrail in CloudWatch Logs Insights: who did what](https://cloudconsole.dev/logs-insights/cloudtrail-who-did-what)
- [CloudWatch Logs Insights query examples](https://cloudconsole.dev/logs-insights/query-examples)
- [CloudWatch Logs Insights syntax cheat sheet](https://cloudconsole.dev/logs-insights/syntax-cheat-sheet)
- [Count errors over time with CloudWatch Logs Insights](https://cloudconsole.dev/logs-insights/count-errors-over-time)
- [dedup in CloudWatch Logs Insights](https://cloudconsole.dev/logs-insights/dedup-results)
- [Filter CloudWatch logs by request ID](https://cloudconsole.dev/logs-insights/filter-by-request-id)
- [Find Lambda timeouts with CloudWatch Logs Insights](https://cloudconsole.dev/logs-insights/lambda-timeouts)
- [Find the slowest Lambda invocations with Logs Insights](https://cloudconsole.dev/logs-insights/lambda-slowest-invocations)
- [Get unique values in CloudWatch Logs Insights](https://cloudconsole.dev/logs-insights/unique-values)
- [Getting more than 10,000 results from Logs Insights](https://cloudconsole.dev/logs-insights/more-than-10000-results)
- [Group by in CloudWatch Logs Insights](https://cloudconsole.dev/logs-insights/group-by)
- [Lambda cold starts and init duration in Logs Insights](https://cloudconsole.dev/logs-insights/lambda-cold-starts)
- [Lambda memory usage with Logs Insights](https://cloudconsole.dev/logs-insights/lambda-memory-usage)
- [Parse JSON fields in CloudWatch Logs Insights](https://cloudconsole.dev/logs-insights/parse-json-fields)
- [Percentile latency with CloudWatch Logs Insights](https://cloudconsole.dev/logs-insights/percentile-latency)
- [Regex parse in CloudWatch Logs Insights](https://cloudconsole.dev/logs-insights/regex-parse)
- [Top IP addresses with CloudWatch Logs Insights](https://cloudconsole.dev/logs-insights/top-ip-addresses)
- [VPC Flow Logs rejected traffic in Logs Insights](https://cloudconsole.dev/logs-insights/vpc-flow-logs-rejected-traffic)

---

Source: https://cloudconsole.dev/logs-insights/

CloudConsole is an independent iPhone and Android app for Amazon Web Services by Cloudconcur Ltd. It is not affiliated with Amazon Web Services.
