Serverless Log Filter Subscription

homepage icon https://github.com/schwamster/serverless-log-filter-subscription
Follow @schwamster

Tracked

NPM Downloads Last Month
72
Issues
0
Stars
0
Forks
0
Watchers
0
Watch Star Fork Issue Download License NPM Build Status Coverage Status Contributors

Repo README Contents:

serverless-log-filter-subscription

serverless npm version MIT licensed Codacy Badge npm downloads

This serverless plugin creates log filter subscription for all lambda functions configured in your projects serverless.yml. This is useful if you already have a kinesis stream setup that you want to fill with all your lambdas logs to forward them to other logging tools like splunk, elastic search…

This plugin is developed very much to the point and therefore does expect the parameters in a certain way. Much more flexibility is possible if somebody is interested in taking it further.

Usage

    npm i serverless-log-filter-subscription --save-dev

open serverless.yml and add the following:

    plugins:
    - serverless-log-filter-subscription

    ...

    custom:
        logFilterSubscription:
            name: 'example-lambda-logfilter' //required
            roleName: 'someRole'             //required - must exist
            filterPattern: ''                //required - empty string is ok
            kinesisStreamName: 'someStream'  //required

now you can run:

    serverless create-log-filter-subscription