title: filter kinesis event by lambda
body: <p>i have looked at  : <a href="https://docs.aws.amazon.com/lambda/latest/dg/invocation-eventfiltering.html" rel="nofollow noreferrer">https://docs.aws.amazon.com/lambda/latest/dg/invocation-eventfiltering.html</a></p>
  <p>to filter events before invoking lambda but i can't achieve that, can you help please?</p>
  <pre><code>{'Records': [{'kinesis': {'kinesisSchemaVersion': '1.0', 'partitionKey': '37540688c73d2b2be11490f8b5ae93ff', 'sequenceNumber': '49631675050471285384259191448171119417567571671338975282', 'data': 'H4sIAAAAAAAAADWPwWrDM/dKjZTcuGY41bsqwf5TP7VH0Mr36uLhfYv8PTlNKY8nksaV7DdfShuFB89TcHp9+m/uZC3bJ38GcubFprkQixZRMkbI1SyqI1lgySRK1JKkKtJAmlTSOEJiOwZYfqeWOdFtbFlgxzko2QtPvfzvUFHqfHD/S8r4ANAQAA', 'approximateArrivalTimestamp': 1658758525.02}, 'eventSource': 'aws:kinesis', 'eventVersion': '1.0', 'eventID': 'shardId-000000000003:49631675050471285384259191448171119417567571671338975282', 'eventName': 'aws:kinesis:record', 'invokeIdentityArn': 'arn:aws:iam::XXX:role/XXX', 'awsRegion': 'eu-west-1', 'eventSourceARN': 'arn:aws:kinesis:eu-west-1:XXXX:stream/XXX'}]}
  </code></pre>
  <p>i want to avoid &quot;CONTROL_MESSAGE&quot; so that i tried this pattern on filter :
  { &quot;data&quot;: { &quot;messageType&quot;: [ &quot;DATA_MESSAGE&quot; ] } }</p>
  <p>but doesn't work ! it is because the data bloc in compressed and encoded ?</p>