We're long time users of Serverless Framework since v2. When v3 came out, we were able to quickly switch and all was good. Then came v4 and things changed, especially since a new licensing and pricing strategy was introduced. While there were new features, we didn't really need those anyway. We tried to get in touch with Serverless Inc. to discuss custom pricing options but they ignored our requests.
Luckily, in the meanwhile, the v3 version we loved so much was forked under the name osls (short for Open Serverless) by Matthieu Napoli, the creator of Bref (the tool that allows you to run PHP on Lambda which is not natively supported by AWS). This fork basically allowed the community to seamless switch from Serverless Framework v3 to Open Serverless, it is also very well supported.
Open Serverless v4
Open Serverless v3 as a fork contains some legacy code and features. By releasing v4 these things can finally be removed. There is a well documented upgrade guide available to upgrade from v3 to v4. I recently tested this on one of our stacks and it was super easy. Having that said, we don't use very exotic features which makes the process pretty easy.
AWS SSO
AWS SSO support is now built in so you no longer need the serverless-better-credentials plugin. Currently you first need to login manually using aws sso login but a feature is in review that handles this using an interactive login as the plugin does.
Function Pruning
Automatic function pruning no longer requires serverless-prune-plugin as it can be configured natively:
provider:
pruneFunctionVersions: true # keeps 10 versions (default)
Enter fullscreen mode Exit fullscreen mode
or a custom amount using:
provider:
pruneFunctionVersions:
number: 5
Enter fullscreen mode Exit fullscreen mode
Durable Functions
Support for Lambda Durable Functions was added, it can be configured with durableConfig like this:
functions:
orderProcessor:
handler: handler.processOrder
runtime: nodejs24.x
durableConfig:
executionTimeout: 3600
retentionPeriodInDays: 30
Enter fullscreen mode Exit fullscreen mode
For more information, check the full documentation on this feature.
AWS SDK v2 deprecation
The AWS SDK v2 was deprecated for a long time but still used by the framework. All implementations in are updated to use AWS SDK v3 now instead. This is great and it should also remove many warnings from audit tools.
The downside is that this will prevent some plugins from working that rely on provider.request() for doing requests to AWS. I created a small plugin that tries to provide a backwards compatibility layer that tries to convert a SDK v2 request into an SDK v3 request. For me it worked on the following plugins:
- serverless-step-functions
- serverless-stack-termination-protection (a PR exists to add native support)
If you have plugins that work with v4 after using this plugin, put them in the comments and/or create a PR that adds it to the readme of the plugin itself.
Esbuild
I'm also very happy the serverless-esbuild plugin still works as expected. Please look at this post to see how I optimized my builds to reduce cold start times.
Sponsoring
We're still very happy and thankful that this fork exists and decided to sponsor Open Serverless/Bref with a monthly donation. Please do the same if these tools are useful to you so we can all benefit from continued support.
0 Comments
Log in to join the conversation.No comments yet. Be the first to share your thoughts.