serverless-plugin-aws-contributor-insights

1.0.4 • Public • Published

serverless-plugin-aws-contributor-insights

This plugin allows to use serverless framework to deploy contributor insights for AWS CloudWatch.

To use this plugin, please specify the following

plugins:
  - serverless-plugin-aws-contributor-insights

custom:
  contributor-insights:
    - ruleBody: "{\"Schema\":{\"Name\":\"CloudWatchLogRule\",\"Version\":1},\"AggregateOn\":\"Count\",\"Contribution\":{\"Filters\":[{\"Match\":\"$.status\",\"GreaterThan\":500}],\"Keys\":[\"$.path\",\"$.status\"]},\"LogFormat\":\"JSON\",\"LogGroupNames\":[\"\/aws\/apigateway\/*\"]}" #REQUIRED
      ruleName: rule-1 #REQUIRED
      ruleId: ruleid1 #OPTIONAL
      ruleState: ENABLED #REQUIRED
      tags: #OPTIONAL
        - Key: key1
          Value: value1
        - Key: Key2
          Value: value2
    - ruleBody: #Supports yaml notation for ruleBody
        Schema:
          Name: CloudWatchLogRule
          Version: 1
        LogGroupNames:
        - API-Gateway-Access-Logs*
        - Log-group-name2
        LogFormat: JSON
        Contribution:
          Keys:
          - "$.ip"
          ValueOf: "$.requestBytes"
          Filters:
          - Match: "$.httpMethod"
            In:
            - PUT
        AggregateOn: Sum
      ruleName: rule-2
      ruleId: ruleid2
      ruleState: ENABLED
      tags:
        - Key: key3
          Value: value3
        - Key: key4
          Value: value4
    

Package Sidebar

Install

npm i serverless-plugin-aws-contributor-insights

Weekly Downloads

3

Version

1.0.4

License

MIT

Unpacked Size

4.51 kB

Total Files

4

Last publish

Collaborators

  • cfkang77