4.45.0
- Web apps can run Node.js HTTP servers such as Express, Fastify, Hono and Next.js on AWS Lambda Web Functions, defined under the new top-level webApps block
- serverless invoke --web-app, serverless logs --web-app, serverless info, serverless diff, serverless rollback and serverless agent inspect --web-apps support web apps
- Web apps can require IAM-signed requests with url.authorizer set to aws_iam
- Web apps can serve a custom domain through Amazon CloudFront, with several web apps sharing one hostname by basePath
- sandboxes.<name>.package.patterns option works like functions.<name>.package.patterns
- serverless invoke --sandbox accepts repeated --header 'Name: value' options to send request headers
- Sandboxes no longer upload local dependency and cache directories such as node_modules, .venv, venv, __pycache__, .pytest_cache and .mypy_cache at any depth
- When the sandbox artifact is the root directory, default function packaging exclusions such as .git and .serverless apply
- The Dockerfile at the root of a sandbox artifact is always included in the upload
- serverless dev --sandbox builds its local image from the same files as deployment
- Services with only web apps, sandboxes, agents or resources print 'No changes to deploy' when code and configuration are unchanged and the stack holds the last deploy
- Function- and agent-only options such as --qualifier and --log now stop the command with an error when used with --sandbox behavior changed · inferred, marked in the notes below
- Serverless API requests and serverless login choose the proxy from HTTPS_PROXY, then HTTP_PROXY, and the generic proxy variable only when neither is set behavior changed · inferred, marked in the notes below
- Serverless API requests pass the proxy CA from HTTPS_CA/HTTPS_CAFILE to the TLS connection, and serverless login honours NO_PROXY
- Serverless API requests through a proxy on Node.js 26 no longer fail with 'fetch failed; invalid onError method' when HTTPS_PROXY or HTTP_PROXY is set
- Credential providers that call AWS, such as SSO profiles, now honour HTTPS_PROXY/HTTP_PROXY, CA, timeout and NO_PROXY settings instead of failing with CredentialsProviderError: AggregateError
- New API Gateway REST, HTTP and WebSocket custom domains with createRoute53IPv6Record set to true are created dualstack so AAAA records resolve
- Later deploys keep an API Gateway custom domain's IP address type instead of resetting it to IPv4
3 changes to check, marked in the notes below
From serverless
Features
- Web apps: run Express, Fastify, Hono, Next.js and other Node.js HTTP servers on AWS Lambda Web Functions. Define a server under the new top-level
webAppsblock andserverless deploypackages it (bundling TypeScript with esbuild), uploads it, creates the web function and its HTTPS endpoint, and prints the endpoint URL. Your code starts a server and listens onprocess.env.PORT, as it does locally; there is no handler to export and no adapter to install. Web apps take the sameprovidersettings as functions for environment variables, IAM, VPC and tags, can require IAM-signed requests (url.authorizer: aws_iam), and can serve a custom domain through Amazon CloudFront, with several web apps sharing one hostname bybasePath.serverless invoke --web-app,serverless logs --web-app,serverless info,serverless diff,serverless rollbackandserverless agent inspect --web-appscover them too. Read more in the Web Apps guide, and try the Express, Next.js and custom domain examples. (#13987, #13989)
provider:
name: aws
region: us-east-1
domains:
- name: shop.example.com
webApp: site # every path the other entry doesn't match
- name: shop.example.com
basePath: api # /api and /api/*
webApp: api
webApps:
site:
entry: .next/standalone/server.js
build: false
package:
patterns: ['!**', '.next/standalone/**']
api:
entry: src/server.ts
serverless invoke --web-app api --path /api/health
- Sandboxes upload only the files they need. A sandbox with a local
artifactdirectory no longer uploads local dependency and cache directories (node_modules,.venv,venv,__pycache__,.pytest_cache,.mypy_cache) at any depth. Withartifact: ., the default packaging exclusions for functions (such as.gitand.serverless) apply as well. The newsandboxes.<name>.package.patternsworks likefunctions.<name>.package.patterns, and theDockerfileat the root of the artifact is always included.serverless dev --sandboxbuilds its local image from the same files. Read more in Choosing the files. (#13990, #13997) behavior changed · inferred
sandboxes:
api:
artifact: ./app
package:
patterns:
- '!app/tests/**'
- 'app/node_modules/**' # re-include vendored dependencies
Note If a sandbox's artifact directory holds files the new defaults leave out, such as
node_modules, the first deploy after upgrading rebuilds its image once and updates it in place; no resource is replaced.
-
Unchanged deploys are skipped for services without functions. A service with only web apps, sandboxes, agents or
resourcesnow printsNo changes to deploywhen its code and configuration are unchanged and its stack holds the last deploy, as services with functions already did. After a deploy that failed or rolled back, deploys run until one updates the stack again. Read more in Deployment Bucket. (#13989, #13996) -
serverless invoke --sandboxsends request headers. Repeat--header 'Name: value'to add headers, for example--header 'Content-Type: application/json'with--data. Options that only apply to functions and agents, such as--qualifieror--log, now stop the command with an error such as✖ --qualifier is not available with --sandbox.Read more in Invoking a Sandbox. (#13989) behavior changed · inferred
serverless invoke --sandbox api --path /items --method POST --header 'Content-Type: application/json' --data '{"name":"widget"}'
Bug Fixes
- Fixed Serverless API requests through a proxy on Node.js 26. With
HTTPS_PROXYorHTTP_PROXYset, sign-in, license key checks,serverless usage,serverless reconcileand usage reporting no longer fail withfetch failed; invalid onError methodon Node.js 26. (#13992) - Fixed AWS credential lookups behind a proxy. Credential providers that call AWS themselves, such as SSO profiles, now go through
HTTPS_PROXY/HTTP_PROXYwith the same CA, timeout andNO_PROXYhandling as the Framework's AWS requests, instead of failing withCredentialsProviderError: AggregateErroron networks that only allow proxied traffic. Read more in Credentials. (#13994) - Serverless API requests and
serverless loginchoose the proxy the same way as AWS requests. For these HTTPS requests the Framework now usesHTTPS_PROXY, elseHTTP_PROXY, and the genericproxyvariable only when neither is set. It passes the proxy CA fromHTTPS_CA/HTTPS_CAFILEto the TLS connection with the proxy, andserverless loginhonoursNO_PROXY. IfHTTP_PROXYandHTTPS_PROXYpoint to different proxies, Serverless API requests now go through theHTTPS_PROXYone. (#13995) behavior changed · inferred - Fixed IPv6 for API Gateway custom domains. With
createRoute53IPv6Record: truewritten in the configuration, new REST, HTTP and WebSocket custom domains are now created dualstack, so their AAAA records resolve. Domains created without it stay IPv4, and later deploys keep a domain's IP address type instead of resetting it to IPv4. Read more in Custom Domains. (#13985, #13986) serverless devalways logs why the connection to AWS IoT Core ended. When the connection ended after your machine accepted an invocation, the cause was sometimes missing from the function's log; it is now always written before the invocation returns. (#13982)- Faster configuration validation. Looking up the cached validator for
serverless.ymltakes about 8 ms instead of about 120 ms on each command. The first run after upgrading compiles the validator once. (#13942)
Maintenance
- Bumped the AWS SDK group to v3.1150.0, 38 packages (#13989)
- Added @aws-sdk/client-lambda-web v3.1150.0 (#13989)
- Upgraded @serverless-inc/sdk to v2.11.1 (#13992)
- Upgraded undici to v6.29.1 (#13988)
- Removed object-hash from @serverless/framework; the validator cache key is a SHA-256 hash (#13942)
- Removed https-proxy-agent from @serverlessinc/sf-core;
serverless loginuses the proxy agent of @serverless/util (#13995) - Built the Dev Mode bridge with Go 1.27.3 (#13991)