As good as new: Serverless Framework 3.0 emerges thoroughly cleansed, fitted with stage parameters

As good as new: Serverless Framework 3.0 emerges thoroughly cleansed, fitted with stage parameters

While the Serverless Framework project provides a reliable stream of small regular updates, new features have become somewhat of a rarity for the tool looking to help devs work with serverless architectures. Just out version 3.0 breaks with that trend by introducing stage parameters and a new CLI design.

According to Serverless product manager Matthieu Napoli, the latter had become necessary since the growing number of deprecations, plugins, and cloud resources left the tool’s output rather noisy. The reworked CLI therefore looks to “focus on actionable information”, which in practice means less, better formatted output, cleaner logs, and clearer error messages. 

Users who like lots of details can still get more insight using a --verbose flag. A new colour scheme based on the project website’s white, grey, and red is meanwhile meant to help focus on the more important bits of information.

Another major enhancement included in the update are stage parameters. The new addition allows the changing of a service configuration based on the stage (e.g. production, development, testing) it is used in. Admins can set their stage parameters, including a default option, in the serverless.yml under the params key and use them via ${param:XXX} variables.

Developers in need of some extra help to get started with serverless deployments will be interested to learn that running v3.0 of the framework in an empty directory will now start a guided, interactive set up process for serverless projects. Support for setting up the serverless dashboard is also available and can be kicked off by running serverless in a project.

Before switching to the new version, users should be aware that the Serverless Framework team made good use of the option to introduce breaking changes with their major release. In a bid to make the project more maintainable, they conducted a proper clean up, getting rid of the old variables resolver along with support for various outdated runtimes, notations, and commands. 

Developers are therefore encouraged to update their installations to the latest version of the 2.x series (2.27.2), run serverless commands, check whether the projects emits any deprecation warnings, and solve these before upgrading to not run into any problems.

The Serverless Framework is a MIT-licensed command line tool first shared in 2015. It was developed to help users build and deploy web, mobile, and IoT applications on a variety of cloud services and has since been optimised for CI and CD workflows. The current version is said to support code written in “Node.js, Python, Java, Go, C#, Ruby, Swift, Kotlin, PHP, Scala, and F#”.