I am using the Serverless Framework with TypeScript to process DynamoDB stream events and then publish them to an SNS topic. I have configured my Lambda function to use filters to process only specific events from the stream. However, the Lambda function is processing every event from the stream, including those that should be excluded by the filters.<p>Here is my current configuration:<p><pre><code> {
stream: {
arn: "${self:provider.environment.FORTUM_SESSION_STREAM}",
type: "dynamodb",
filterPatterns: [
{ eventName: ["INSERT", "UPDATE"] },
{
dynamodb: {
NewImage: {
status: {
S: ["COMPLETED"],
},
},
},
},
{
dynamodb: {
NewImage: {
order: {
M: {
amount: {
N: [{ exists: true }],
},
},
},
},
},
},
],
maximumRetryAttempts: 5,
enabled: true,
bisectBatchOnFunctionError: true
}
},</code></pre>