GitXplorerGitXplorer
t

serverless-plugin-subscription-filter

public
18 stars
5 forks
9 issues

Commits

List of commits on branch master.
Verified
cc261fc2e19efd9b45f0828e0ebd4a2a8ca6adc9

fix: Migrate `babel-cli` to `@babel/cli`

ttsub committed 5 years ago
Verified
4dd00db3212fd40d3099757347ace5b8ee20dbdf

fix: $ npm audit fix --force

ttsub committed 5 years ago
Verified
243a3543f5640a88620e68731980f83289edb34d

fix: $ npm audit fix

ttsub committed 5 years ago
Verified
4a4e1a9681c6440647f7a9aa4c1a35444d5ffab1

chore: Migrate yarn to npm

ttsub committed 5 years ago
Verified
c960f77502a04e49b819eb99cbc8e172d03116d9

Merge pull request #15 from tsub/dependabot/npm_and_yarn/tar-2.2.2

ttsub committed 5 years ago
Verified
8fa06cc7154997188c69b1529f64c33fcbb8e7c8

Merge pull request #16 from tsub/dependabot/npm_and_yarn/extend-3.0.2

ttsub committed 5 years ago

README

The README file for this repository.

serverless-plugin-subscription-filter

serverless npm version

Serverless plugin to register AWS CloudWatchLogs subscription filter.

Installation

npm install --save-dev serverless-plugin-subscription-filter

plugins:
  - serverless-plugin-subscription-filter

Usage

This plugin is external serverless events. You can write settings like serverless events.

functions:
  hello:
    handler: handler.hello
    events:
      - subscriptionFilter:
          stage: prod
          logGroupName: /cloud-trail
          filterPattern: '{ $.errorMessage != "" }'

Supports also multiple subscription filter.

functions:
  hello:
    handler: handler.hello
    events:
      - subscriptionFilter:
          stage: prod
          logGroupName: /cloud-trail
          filterPattern: '{ $.errorMessage != "" }'
      - subscriptionFilter:
          stage: prod
          logGroupName: /my-log-group
          filterPattern: '{ $.errorMessage != "" }'
  goodbye:
    handler: handler.goodbye
    events:
      - subscriptionFilter:
          stage: dev
          logGroupName: /my-log-group2
          filterPattern: Exception

About each properties

property description
stage The deployment stage with serverless. Because only one subscription filter can be set for one LogGroup.
logGroupName The log group to associate with the subscription filter.
filterPattern The filtering expressions that restrict what gets delivered to the destination AWS resource. Sorry, if you want to use '{ $.xxx = "yyy" }' syntax, then surround the whole in ''(single quote).