> For the complete documentation index, see [llms.txt](https://notes.tatusl.dev/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://notes.tatusl.dev/aws/cloudwatch.md).

# CloudWatch

## Logs Insights

### Log query examples

Get all log entries with certain Kubernetes pod name and which log message contain the string "error"

```
fields @timestamp, @message
| filter kubernetes.container_name='$CONTAINER_NAME'
| filter @message like "error"
| sort @timestamp desc
```
