GitXplorerGitXplorer
t

serverless-plugin-subscription-filter

public
18 stars
5 forks
9 issues

Commits

List of commits on branch master.
Verified
a52f3bc3027b3e3b9d01b620c0ac6e906caeca7c

docs: Modify README.md

ttsub committed 5 years ago
Verified
c2928247dbacfbbc2e6a3c18f92086f8ec112dbb

Release 1.0.7

ttsub committed 5 years ago
Verified
e00d8b0ba73b72bdbd0a6c461caa3f65ec82e3c9

chore: Update .npmignore

ttsub committed 5 years ago
Verified
51bf2fa9c05cefe026272b6962dc2099fbe9bde2

chore: Configure release-it

ttsub committed 5 years ago
Verified
cbf0bb7bca61b80494c1436adae083bdc09a69d9

fixup! Merge pull request #11 from tsub/fix-degrade-in-pr7

ttsub committed 5 years ago
Verified
266171afc9fa1a1f95ef876f0f5fb6d17425aa35

chore: Use prepublishOnly instead of prepublish

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).