Cloudwatch Logs Insights search filter in mutliple messages

28 views Asked by At

this is how my log looks

2024-03-16T23:21:21.275Z ff84d7a6-991a-**** unauthorized_error
2024-03-16T23:21:21.275Z ff84d7a6-991a-**** client: client1

I want to search for: unauthorized_error but if client is not client1 as you can see the other filter is in another message so doing this doesn't work

fields @timestamp, @message, @logStream, @log 
| filter @message like /(?i)unauthorized/ and @message not like /(?i)client1/
| sort @timestamp desc
| limit 10000
0

There are 0 answers