github serverless/serverless 4.0.24
4.0.24 (Beta) (2024-05-22)

latest releases: v4.4.7, v4.4.6, v4.4.5...
5 months ago

This is the Serverless Framework V.4 Beta release, after testing the V.4 Alpha for a few months.

In this release, we assumed the serverless npm namespace. To continue to use Serverless Framework V.3 and older versions, please target them in your NPM installs (e.g. npm i serverless@3.38.0 3.38.0 is the latest version of v3), and double-check your automated deployments are doing the same.

If you are upgrading to V.4, see our Upgrading to Serverless Framework V4 Documentation.

If you need to access documentation for Serverless Framework V.3, you can find it here.

Features

  • Native Typescript Support: You can now use .ts handlers in your AWS Lambda functions in serverless.yml and have them build automatically upon deploy. ESBuild is now included in the Framework which makes this possible. More info here.

  • New Dev Mode: Run serverless dev to have events from your live architecture routed to your local code, enabling you to make fast changes without deployment. More info here.

  • New AWS Lambda Runtimes: "python3.12", "dotnet8", and "java21".

  • Support Command: Send support requests to our team directly from the CLI, which auto-include contextual info which you can review before sending.

  • Debug Summary for AI: When you run into a bug, you can run "serverless support --ai" to generate a concise report detailing your last bug with all necessary context, optimized for pasting into AI tools such as ChatGPT.

  • Advanced Logging Controls for AWS Lambda: Capture Logs in JSON, increased log granularity, and setting a custom Log Group. Here is the AWS article. Here is the YAML implementation

  • AWS SSO: Environment variables, especially ones set by AWS SSO, are prioritized. The Framework and Dashboard no longer interfere with these.

  • Build Plugins Run First: Build plugins now run first, if they include the optional tags static property containing a "build" tag run first.

  • Automatic Updates: These happen by default now. Though, you will be able to control the level of updates you're open to.
    Improved Onboarding & Set-Up: The serverless command has been re-written to be more helpful when setting up a new or existing project.

  • Updated Custom Resource Handlers: All custom resource handlers now use nodejs20.x.

  • Deprecation Of Non-AWS Providers: Deprecation of other cloud providers, in favor of handling this better in our upcoming Serverless Framework "Extensions".

Breaking Changes

We're seeking to avoid breaking changes for the "aws" Provider. However, there are a few large things that are changing to be aware of:

  • The V.4 License is changing. See the Upgrading to Serverless Framework V4 Documentation. Please note, the structure and licensing of the V.4 Beta repository differ from the V.4 Beta npm module. The npm module contains additional proprietary licensed software, as V.4 transitions to a common SaaS product, as previously announced. While the original Serverless Framework source code and more will continue to remain MIT license software, the repository will soon be restructured to clearly distinguish between proprietary and open-source components.
  • Authentication is required within the CLI.
  • Non-AWS Providers have been deprecated. We will be introducing new ways in V.4 to use other cloud infrastructure vendors.

If you stumble upon additional breaking changes, please create an issue. To learn more about what's different and potential breaking changes, please see our Upgrading to Serverless Framework V4 Documentation.

Bug Fixes

  • Loading a custom config file is broken: #12505
  • Plugin Custom Resolution Issues: #12508
  • Improve error messages when plugins are missing or not installed properly: #12513
  • Fix missing backward compatible logging method which affects some plugins: #12509

Don't miss a new serverless release

NewReleases is sending notifications on new releases.