Package Exports
- serverless-disable-functions
- serverless-disable-functions/src/index.js
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (serverless-disable-functions) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
serverless-disable-functions
A simple serverless plugin to disable functions.
Install
yarn add --dev serverless-disable-functionsor
npm install --save-dev serverless-disable-functionsAdd the plugin to your serverless.yml file:
plugins:
- serverless-disable-functionsUsage
Add the parameter enabled: false to a function to disable it.
This allows you to enable/disable functions by stage like so:
service: hello-service
provider: aws
custom:
hello_enabled:
dev: true
prod: false
functions:
hello:
handler: handler.hello
enabled: ${self:custom.hello_enabled.${opt:stage}}