Back to results for “Monitoring”
AWS › Monitoring (CloudWatch)

How does CloudWatch Logs Insights let you query and analyze log data to troubleshoot application issues?

Intermediate

Answer

CloudWatch Logs Insights provides a purpose built query language that lets you search, filter, and aggregate log data across one or more log groups interactively, allowing you to quickly answer questions like how many error messages occurred in the last hour or which specific requests took longer than a certain threshold, without needing to export logs to a separate external tool for this kind of ad hoc investigation.
fields @timestamp, @message | filter @message like /ERROR/ | sort @timestamp desc | limit 20
Real-world example A developer investigating a production issue uses CloudWatch Logs Insights to quickly filter and sort through millions of log lines, finding the specific error messages that occurred right before a reported customer issue within seconds rather than manually scrolling through raw log files.

Common follow-ups: How does Logs Insights pricing compare to simply storing and browsing raw logs?;Can Logs Insights queries be saved and reused for recurring investigations?