0.1.3 • Published 3 years ago

serverless-plugin-disable-events v0.1.3

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

serverless-plugin-disable-events

npm version semantic-release

A serverless plugin for selectively disabling events.

The lack of YAML conditionals makes it difficult to disable events based on stage, env vars, or other conditions. Developers often have to resort to complicated YAML anchor gymnastics to disable function events in unsupported environments.

This plugin allows you to disable events based on a boolean value for all functions, or selected functions.

Usage

To disable all events for all functions. The value can be a string, boolean, or interpolated value.

plugins:
  - serverless-plugin-disable-events

custom:
  disableEvents: true

To disable events for specific functions

plugins:
  - serverless-plugin-disable-events

custom:
  disableEvents:
    my-function-name: true
    my-other-function: ${env:DISABLE_EVENTS}

functions:
  my-function-name: ...
  my-other-function: ...