1.0.1 • Published 2 years ago

@xoi/serverless-log-keeper v1.0.1

Weekly downloads
-
License
Apache-2.0
Repository
github
Last release
2 years ago

@xoi/serverless-log-keeper

Log Keeper

Serverless Framework plugin that adds a deletion retain policy on aws lambda logs

npm Version badge Unit Tests codecov

Usage

  1. To use this serverless plugin, you must first install it as a dependency.

    Run npm install --save-dev @xoi/serverless-log-keeper or yarn add --dev @xoi/serverless-log-keeper

  2. Add the plugin to your serverless.yml and add its configuration properties

    [...]
    region: us-east-2
    
    plugins:
      - '@xoi/serverless-log-keeper'
    
    logkeeper:
      keepLambdaLogs: true
    [...]
  3. Continue using Serverless as you normally would! Logkeeper will automatically add a deletion policy of retain to each /aws/lambda LogGroup

Configuration

All configuration is done in serverless.yml at the root level under the logkeeper property.

Here are the possible configuration options: | Configuration Key | Required? | Default | Description | | ----------------- | --------- | ------- | ------------| | keepLambdaLogs | Yes | N/A | A boolean that determines if we're going to retain lambda logs or not |

Contributing

We welcome all contributors with open arms! See CONTRIBUTING.md