tsub / serverless-plugin-subscription-filter

Extend subscription filter events for the Serverless framework :zap:
https://www.npmjs.com/package/serverless-plugin-subscription-filter
MIT License
18 stars 5 forks source link

AWS now supports up to 2 subscription filters per log group. #24

Open sejba opened 3 years ago

sejba commented 3 years ago

The plugin hard-codes only one subscription filter per log group. It also has the "stage" property just to handle this. Is there a chance the plugin could be changed accordingly to the new AWS limits? Thanks.

kennedysam97 commented 3 years ago

Should be a 1-line change on line 114 to fix..

b-tin commented 3 months ago

Could pls help to review, update to support 2 filter subscription https://github.com/tsub/serverless-plugin-subscription-filter/pull/31

...
functions:
  monitoring:
    handler: handler.main
    layers:
      - "${cf:create-lambda-layers-ops.BtinDashpython311DashrequestsLambdaLayerQualifiedArn}"
      - "${cf:create-lambda-layers-ops.BtinDashpython311DashmarshmallowLambdaLayerQualifiedArn}"
    timeout: 60
    tags:
      monitoring: 'true'
    events:
      - subscriptionFilter:
          stage: ops
          logGroupName: /aws/lambda/log-group
          filterPattern: '{ ($.errorCode = "pattern-1") }'
      - subscriptionFilter:
          stage: ops
          logGroupName: /aws/lambda/log-group
          filterPattern: '{ ($.eventName = "pattern-2*") }'