1 Answer
- Newest
- Most votes
- Most comments
0
Hello.
I think you can filter logs that include "fail" and "exception" using the filter pattern below.
fail exception
An example can be found in the documentation below.
https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/FilterAndPatternSyntax.html
Relevant content
- asked 5 years ago
- AWS OFFICIALUpdated 2 years ago

Thanks for the answer. Maybe you know how to make the word case-insensitive?
As of January 2025, I don't think there is a syntax for searching without considering uppercase and lowercase letters in the subscription filter. If you use "?", it becomes an OR condition, but in that case, you will not be able to use an AND condition, so your request will not be met.
If the log is space-delimited, I think you can use a filter pattern like the one below. However, I think that even in this case you need to format it in such a way that it includes all the pattern words to make it case sensitive. For example, it is not possible to distinguish between "Fail", "fail", and "FAIL", so these must be included in the filter pattern.