1.0.0-beta.2 • Published 3 years ago

@wave/serverless-log-deletion-policy v1.0.0-beta.2

Weekly downloads
-
License
MIT
Repository
github
Last release
3 years ago

serverless-log-deletion-policy

A serverless plugin to configure DeletionPolicy on function log groups

Install

Run npm install in your Serverless project.

$ npm install --save-dev @wave/serverless-log-deletion-policy

Add the plugin to your serverless.yml file

plugins:
  - serverless-log-deletion-policy

How to use

This plugin will modify all created Log Groups with DeletionPolicy: "Retain". What this means is when you remove the serverless application or delete the Cloudformation stack the Log Group deletions will be skipped. This will also preserve Log Groups for functions which are renamed so you won't lose your logs.

Warning: This can cause a failure if you try to redeploy a deleted stack or rename a function back to its old name. In this case you can manually delete the log group or rename the functions to work around it.

Configuration

Currently this plugin provides no configuration options. If there's something you'd like to see, please open an issue describing your use case!