Build, configure and deploy all necessary resources with just a few commands... The serverless framework empowers you to streamline your entire development workflow. But what if you need to tackle some project-specific issues? Then you extend its core functionality to suit your needs by implementing the best serverless plugins available.
For you might need to:
- bundle a Lamba function with Webpack
- empty your buckets before removing them
- copy data from production to development table
So, what are your options?
- to scan through the pile of already developed serverless plugins, looking for the one that addresses that specific issue
- to write your own custom serverless plugin
This post here focuses on the first option. I'll reveal to you the 6 most useful community-driven plugins for the serverless framework.
1. But First: What's the Core Functionality of the Serverless Framework?
In other words:
What do you get out-of-the-box?
Here's a short list of tasks that go from being manually carried out to... automated when you go serverless:
- creating, configuring, and deploying the needed resources (API Gateway and Lambda functions)
- storing your code (and configuration) into a repository for later use
- setting up database tables for your functions
- configuring serverless templates for your subnets and VPC's
In other words: using a serverless framework streamlines all those tedious tasks of writing code on the console, configuring your resources, managing your team's workflow...
2. 6 Best Serverless Plugins to Consider for Your Next Project
And the serverless framework itself is an “ecosystem” of plugins.
Nevertheless, there are cases when its core functionality doesn't meet all your project's requirements and you need to... extend it.
Before you rush to write your own plugin, you might want to have a look at what's already been built. In this respect, here's a list of the most widely used ones:
2.1. Serverless Webpack
In a situation where you need to bundle your lambda functions with Webpack?
Let this serverless plugin here handle the job for you.
2.2. Serverless Dotenv
Here's a common scenario:
You need to load your variables, currently stored in an env file, into your serverless yaml config.
Then, this is the serverless framework plugin that comes to your rescue. It enables you to dynamically preload env files into serverless.
2.3. Serverless Offline
Need to run everything on your local machine before you deploy it?
Integrate this plugin here into your framework and it will emulate AWS Lambda and API Gateway on your PC, streamlining your whole development process.
One of the best serverless plugins, a mocha-based one, that provides you support for your test-driven development flow.
Is “injecting” Alibaba Cloud Function Compute support into your serverless app one of your project-specific needs?
Well, then this is the plugin you need! It's been built to enable support for this event-driven compute service into the serverless framework.
What do you do with all those buckets that you will have been “joggling” with once you decide to delete your stack? The one you will have “overly exploited” by then, during your tests?
Well... you remove them. Along with the content that they store.
How? You let this plugin here handle the “decluttering task” for you.
These are the 6 best serverless plugins already available that you can implement into your projects.