### Is there an existing issue for this?

- [X] I have searched the existing issues

### Feature description

AWS has a feature which allows you to [filter incoming lambda invocations using rules](https://docs.aws.amazon.com/lambda/latest/dg/invocation-eventfiltering.html). Without this feature I need to filter inside the lambda code itself which will incur more compute and cost in AWS. In the spirit of having as few diffs between localstack and AWS this is highly desireable for my pipeline.

(And fwiw, my pipeline is DynamoDB -> DynamoDB Stream -> Lambda (Python) -> Opensearch)

The current behavior is that create/update-event-source-mapping does parse (and validate) this option, but it isn't honored against incoming events at runtime.

### 🧑‍💻 Implementation

Implement with the same logic as AWS with support for all the operators in the linked article above.

### Anything else?

_No response_
If the response returns an empty list, then the batch should be considered as a complete success. If an exception
    is raised, the batch should be considered a complete failure.
    See https://docs.aws.amazon.com/lambda/latest/dg/with-sqs.html#services-sqs-batchfailurereporting
    :param result: the lambda invocation result
    :param valid_message_ids: the list of valid message ids in the batch
    :raises KeyError: if the itemIdentifier value is missing or not in the batch
    :raises Exception: any other exception related to parsing (e.g., JSON parser error)
    :return: a list of message IDs that are part of a failure and should not be deleted from the queue
    """
    if not result or not result.result:
        return []
    if isinstance(result.result, dict):
        partial_batch_failure = result.result
    else:
        partial_batch_failure = json.loads(result.result)
    if not partial_batch_failure:
        return []
    batch_item_failures = partial_batch_failure.get("batchItemFailures")
    if not batch_item_failures:
        return []
    messages_to_keep = []
    for item in batch_item_failures:
        if "itemIdentifier" not in item:
            raise KeyError(f"missing itemIdentifier in batchItemFailure record {item}")
        item_identifier = item["itemIdentifier"]
        if item_identifier not in valid_message_ids:
            raise KeyError(f"itemIdentifier '{item_identifier}' not in the batch")
        messages_to_keep.append(item_identifier)
    return messages_to_keep