Serverless Plugin Iopipe

homepage icon
Follow @iopipe


NPM Downloads Last Month
Watch Star Fork Issue Download License NPM Build Status Coverage Status Contributors

Repo README Contents:

IOpipe Serverless Framework Plugin (Beta)

serverless CircleCI styled with prettier

A serverless plugin to automatically wrap your functions with iopipe.



With yarn (recommended) in project directory:

yarn add iopipe
yarn add serverless-plugin-iopipe --dev

With npm in project directory:

npm install iopipe
npm install serverless-plugin-iopipe --save-dev

Add the plugin to your serverless.yml file:

  - serverless-plugin-iopipe

Add your IOpipe project token within the “custom” config in serverless.yml. Where is the token? Alternatively, you can ensure that $IOPIPE_TOKEN is set in the lambda environment.

  iopipeToken: YOUR_TOKEN_HERE

You’re set! The plugin will run during an sls deploy.

Check out an example here.

How Does it Work?

serverless-plugin-iopipe outputs a file that imports and wraps the function handlers defined in serverless.yml with IOpipe so you don’t have to. It allows you to deploy and upgrade multiple functions simultaneously.


All options are set in the “custom” config in serverless.yml. See Example

iopipeToken (required)

The token (clientId) of the project you would like to wrap your functions with. Falls back to $IOPIPE_TOKEN in the lambda environment.

iopipeNoVerify (optional)

Skip a check that ensures iopipe is installed via npm/yarn and present in package.json

iopipeNoUpgrade (optional)

The plugin automatically upgrades the IOpipe library to the latest available version that satisfies the semver range specified in package.json. Use this option to disable that feature.

iopipeNoYarn (optional)

When auto-upgrading, Yarn will be used in place of NPM if a yarn.lock file is found. Use this flag disable yarn and use NPM to upgrade the iopipe library.

iopipeExclude (optional)

Exclude certain functions from the plugin. Comma separated string.

iopipePlaceholder (optional)

Use process.env.IOPIPE_TOKEN as a placeholder variable to allow the token to be configured via environment variables in Serverless, AWS CLI, or AWS Console instead of embedding the token string directly.

iopipeNoStats (optional)

By default, the plugin sends anonymized, non-identifying usage statistics to Google Analytics. IOpipe will use this info to prioritize updates and enhancements to the plugin. If you’d like to opt out of this, just set this option.

Known Issues


File an issue here, hit us up on Slack, or send us a note at