### 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_
return method == "POST" and bool(re.match(PATH_REGEX_TEST_INVOKE_API, path))
def get_stage_variables(context: ApiInvocationContext) -> Optional[Dict[str, str]]:
    if is_test_invoke_method(context.method, context.path):
        return None
    if not context.stage:
        return {}
    region_name = get_api_region(context.api_id)
    api_gateway_client = aws_stack.connect_to_service("apigateway", region_name=region_name)
    try:
        response = api_gateway_client.get_stage(restApiId=context.api_id, stageName=context.stage)
        return response.get("variables")
    except Exception:
        LOG.info("Failed to get stage %s for API id %s", context.stage, context.api_id)
        return {}
def gateway_response_to_response_json(item, api_id):
    base_path = "/restapis/%s/gatewayresponses" % api_id
    item["_links"] = {
        "self": {"href": "%s/%s" % (base_path, item["responseType"])},
        "gatewayresponse:put": {
            "href": "%s/{response_type}" % base_path,
            "templated": True,
        },
        "gatewayresponse:update": {"href": "%s/%s" % (base_path, item["responseType"])},
    }
    item["responseParameters"] = item.get("responseParameters", {})
    item["responseTemplates"] = item.get("responseTemplates", {})
    return item
def get_gateway_responses(api_id):