Skip to main content

Module filter

Module filter 

Source
Expand description

Lambda event source mapping filter criteria.

Implements the EventBridge-style JSON pattern subset documented for Lambda ESM FilterCriteria. A record is delivered when any supplied pattern matches; a record is dropped when every pattern fails to match.

Operators implemented (matches AWS’s documented surface):

  • exact-string / number / boolean / null match
  • {"exists": bool} — field presence
  • {"prefix": "..."} / {"suffix": "..."} / {"equals-ignore-case": "..."}
  • {"anything-but": value | [values]}
  • {"numeric": [op, n, op, n, ...]} with =, <, <=, >, >=
  • SQS body decode: when the pattern contains a top-level body key whose value is an object, the SQS message body is parsed as JSON before pattern matching, mirroring AWS behavior.

Structs§

FilterSet
Compiled filter set. patterns parses the raw Filters: [{Pattern: "..."}] strings into JSON objects once at create time.