Can Amazon Cloudwatch Logs Insights access json fields?

Viewed 463

I am trying to write json logs to CloudWatch, and I planned to access json fields in the log, like:

fields @timestamp, log.url, log.body ,log.error
| sort @timestamp desc
| filter log.error is string
| limit 500

And the logs are json strings like

{"url": "GET /foo", "body": "goo" "error": "hoo"}

I wish CloudWatch understand that my log entries are jsons, and I can do things with json fields, is that possible?

0 Answers
Related