serverless-plugin-aws-logs-subscription-filter
v0.1.0
Published
A Serverless plugin to easily add subscription filter to functions.
Downloads
25
Maintainers
Readme
Serverless Plugin AWS Logs Subscription Filter
[![NPM version][npm-image]][npm-url] [![Build Status][travis-image]][travis-url] [![Coverage percentage][coveralls-image]][coveralls-url]
A Serverless plugin to easily add subscription filter to functions. See https://docs.aws.amazon.com/fr_fr/AWSCloudFormation/latest/UserGuide/aws-resource-logs-subscriptionfilter.html
Installation
npm i serverless-plugin-aws-logs-subscription-filter
Usage
service: your-service
provider:
name: aws
runtime: nodejs8.10
custom:
awsLogsSubscriptionFilter:
destinationArn: "arn:aws:lambda:${self:provider.region}:*:function:log-filter"
filterPattern: "{$.userIdentity.type = Root}"
roleArn: "arn:aws:iam::*:role/log-filter"
plugins:
- serverless-plugin-aws-logs-subscription-filter
functions:
foo:
handler: foo.handler
awsLogsSubscriptionFilter:
destinationArn: "arn:aws:lambda:${self:provider.region}:*:function:log-filter-foo"
filterPattern: "{$.userIdentity.type = foo}"
roleArn: "arn:aws:iam::*:role/log-filter-foo"