Filters log events in a specified CloudWatch log group using FilterLogEvents API.
Parameters:
aws_region (str): The AWS region - use 'us-east-1' if not specified.
log_group (str): The name of the log group.
start_time (str): ISO formatted start timestamp (e.g. '2025-04-10T00:00:00Z').
end_time (str): ISO formatted end timestamp (e.g. '2025-04-11T00:00:00Z').
filter_pattern (str): A filter pattern to match events.
limit (int): Maximum number of log events to return.
**Supported regex syntax:**
- When using regex to search and filter log data, you must surround your expressions with %.
- Filter patterns with regex can only include the following:
- Alphanumeric characters - An alphanumeric character is a character that is either a letter (from A to Z or a to z) or a digit (from 0 to 9).
- Supported symbol characters - These include: '_', '#', '=', '@','/', ';', ',', and '-'. For example, %something!% would be rejected since '!' is not supported.
- Supported operators - These include: '^', '$', '?', '[', ']', '{', '}', '|', '', '*', '+', and '.'.
- The ( and ) operators are not supported. You cannot use parentheses to define a subpattern.
- Multi-byte characters are not supported.
Returns:
str: JSON-formatted list of matching log events.