My favorite plugins for the Serverless Framework
Tags: aws, serverless
Published: 2021-03-23 09:42:00

---
title: My favorite plugins for the Serverless Framework
published: true
date: 2021-02-22 00:00:00 UTC
tags: aws,serverless
canonical_url: https://jurriaan.cloud/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](https://jurriaan.cloud/goto?link=https%3A%2F%2Fgithub.com%2FUnitedIncome%2Fserverless-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](https://jurriaan.cloud/goto?link=https%3A%2F%2Fgithub.com%2Fagutoli%2Fserverless-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](https://jurriaan.cloud/goto?link=https%3A%2F%2Fgithub.com%2Fk1LoW%2Fserverless-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](https://jurriaan.cloud/goto?link=https%3A%2F%2Fgithub.com%2Ffunctionalone%2Fserverless-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](https://jurriaan.cloud/goto?link=https%3A%2F%2Fgithub.com%2FMikeSouza%2Fserverless-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](https://jurriaan.cloud/goto?link=https%3A%2F%2Fgithub.com%2Fanantab%2Fserverless-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](https://jurriaan.cloud/goto?link=https%3A%2F%2Fgithub.com%2Fsilvermine%2Fserverless-plugin-cloudfront-lambda-edge)

- Want to have a somewhat more exotic CloudFront distribution with Lambda@Edge functions, but [the built-in support](https://jurriaan.cloud/goto?link=https%3A%2F%2Fwww.serverless.com%2Fframework%2Fdocs%2Fproviders%2Faws%2Fevents%2Fcloudfront%2F) 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`