serverless-plugin-subscription-filter icon indicating copy to clipboard operation
serverless-plugin-subscription-filter copied to clipboard

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

Open sejba opened this issue 4 years ago • 2 comments

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.

sejba avatar Dec 27 '20 00:12 sejba

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

kennedysam97 avatar Feb 24 '21 18:02 kennedysam97

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*") }'

b-tin avatar Jul 05 '24 06:07 b-tin