• Stars
    star
    18
  • Rank 1,208,065 (Top 24 %)
  • Language
    JavaScript
  • License
    MIT License
  • Created almost 8 years ago
  • Updated 5 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Extend subscription filter events for the Serverless framework ⚡

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

More Repositories

1

s3-edit

Edit directly a file on Amazon S3 in CLI
Go
80
star
2

circleci-build-trigger

[Deprecated] Scheduler to build your CircleCI project with AWS Lambda ⚡
JavaScript
17
star
3

docker-graph-easy

Dockerized graph-easy
Shell
14
star
4

serverless-daily-standup-bot

[under development] ⚡ Asynchronous daily stand-up meeting in Slack
Go
11
star
5

dotfiles

My dotfiles
Ruby
9
star
6

rust-slack-bot

A sample of Slack bot written in Rust.
Rust
9
star
7

fkill

Kill processes with fzf
Shell
8
star
8

fish-fzf-git-recent-branch

Efficient fish keybinding for fzf with git branch
Shell
8
star
9

alfred-datadog-workflow

A Alfred workflow to open Datadog pages
Go
6
star
10

albert-github

Open GitHub repository in browser with Albert
Python
4
star
11

fish-fzf-ghq

Efficient fish keybindinging for fzf with ghq
Shell
4
star
12

echo-sandbox

A sandbox for the echo framework.
Go
4
star
13

serverless-qiita-team-template

[under development] Create a Qiita:Team new post from templates
Go
4
star
14

eks-sandbox

HCL
3
star
15

ecs-sandbox

HCL
2
star
16

circleci-orbs-sandbox

1
star
17

alfred-aws-vault-workflow

A Alfred workflow to open the AWS Management Console with aws-vault
1
star
18

elm-tutorial

Write a sample code of the Elm tutorial
Elm
1
star
19

cockroachdb-sandbox

Go
1
star
20

slides

My slides
Shell
1
star
21

asdf-terraform-build

Terraform plugin with go build for the asdf version manager
Shell
1
star
22

blog

Build with Hugo
Dockerfile
1
star
23

awesome_events

feedforce job training from 2016/5/24 to 2016/6/10
Ruby
1
star
24

homebrew-s3-edit

A Homebrew formula for tsub/s3-edit
Ruby
1
star
25

docker-ghr

Dockerized ghr 🐳
1
star
26

docker-rails-boilerplate

Ruby
1
star
27

go-slack-bot

A sample of Slack bot written in Go.
Go
1
star
28

docker-mruby-cli

Docker image for mruby-cli 🐳
1
star
29

grpc-go-sandbox

The sandbox of the gRPC apps implemented in Go.
Go
1
star
30

docker-write-mime-multipart

Dockerized write-mime-multipart
Shell
1
star