DEV Community

Jurriaan Proos
Jurriaan Proos

Posted on • Originally published at jurriaan.cloud on

My favorite plugins for the Serverless Framework

The Serverless Framework allows extending its functionality by so-called plugins. Here are some of my favorite plugins for the Serverless Framework in no particular order.

serverless-python-requirements

https://github.com/UnitedIncome/serverless-python-requirements

  • Packages Python dependencies with your functions for you.
  • Lots of configuration options to customize final deployment package.
  • Support for requirements.txt, Pipenv, Poetry.

serverless-layers

https://github.com/agutoli/serverless-layers

  • Creates and attaches layer with dependencies to your functions.
  • Updates layer only when dependencies change.
  • Faster deployment as only code needs to be packaged.
  • Supports Python (requirements.txt), NodeJS (package.json) and Ruby (Gemfile).

serverless-s3-sync

https://github.com/k1LoW/serverless-s3-sync

  • A simple plugin to sync local directories to an S3 bucket for e.g. a static website.

serverless-iam-roles-per-function

https://github.com/functionalone/serverless-iam-roles-per-function

  • Up your security level by applying specific IAM roles per function.
  • Limit function’s access to AWS resources to only those required by the function (principle of least privilege).

serverless-deployment-bucket

https://github.com/MikeSouza/serverless-deployment-bucket

  • By default, the Serverless Framework creates an S3 bucket for deployment files with a rather cryptic name. Also, for each Serverless project it’ll create a new one. This plugin creates one with specified name and uses that to upload the functions to.

serverless-plugin-ifelse

https://github.com/anantab/serverless-plugin-ifelse

  • Allows writing of if else conditions in serverless.yaml to add/change/remove attributes, e.g. to limit deployment of certain functions to certain environments or turn off the Lambda authorizer when running locally.

@silvermine/serverless-plugin-cloudfront-lambda-edge

https://github.com/silvermine/serverless-plugin-cloudfront-lambda-edge

  • Want to have a somewhat more exotic CloudFront distribution with Lambda@Edge functions, but the built-in support does not allow you? This plugin recently saved me and maybe it can save you.
  • Allows for more dynamically attaching Lambda@Edge functions to specific PathPatterns of CloudFront distributions defined in the resources section in serverless.yaml

Top comments (0)