Filter Pattern is not being applied on Trigger through Serverless.yaml

Hi,

I am currently using lambda, dynamodb + streams in my project.

Scenario :
I want to trigger the lambda as soon as a record is inserted into the dynamodb.
The lambda should only be triggered for INSERT event.
On manually adding the trigger and applying the filter event it works as expected and the lambda is triggered only for INSERT events and is visible in lambda console.

Problem :
When the Lambda is being deployed through serverless.yaml file only the trigger is being successfully applied on the lambda and also visible in the lambda console.
The issue is the filter pattern is not being applied on the trigger. Due to which all the events INSERT MODIFY & REMOVE are triggering the lambda.

The serverless file has also been verified through a yaml validator and no issues there.

I’m using dotnet 6 as the runtime.

Partial Serverless File :

functions: 
  operation-handler: 
      name: com-sit-operation
      description: operation-task
      handler: OperationTask::OperationTask.Operation::OperationFunction 
      timeout: ${self:custom.lambdaTimeout}
      disableLogs: false
      events:
          - stream:
              type: dynamodb
              arn: ${self:custom.tableStreamArn}
              filterPatterns:
                - eventName: [INSERT]
              batchSize: 30
              startingPosition: LATEST
              batchWindow: 300
              enabled: true

Any help would be appreciated. Thanks in advance.