serverless-plugin-disable-events
v0.1.3
Published
A serverless plugin for selectively disabling events
Downloads
1,706
Readme
serverless-plugin-disable-events
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: ...