We are excited to announce the release of Serverless Framework v3!
This new major version brings a cleaner and redesigned CLI experience as well as a brand new feature: stage parameters.
Read all about Serverless Framework v3 in the official blog post.
⚠ BREAKING CHANGES
Read the complete v3 Upgrade Guide.
- Variables: Old variables resolver is permanently removed. Any resolution error as approached with current resolver is assumed as final (there's no longer fallback to old resolver)
- AWS Lambda:
- Default lambda hashing algorithm was changed to
20201221
- Runtimes
nodejs10.x
,python2.7
,ruby2.5
anddotnetcore2.1
reached end of support on AWS and are no longer recognized in configuration. - Default runtime has been changed from
nodejs12.x
tonodejs14.x
- Properties
service.awsKmsKeyArn
andfunctions[].awsKmsKeyArn
are no longer supported. Useprovider.kmsKeyArn
andfunctions[].kmsKeyArn
instead.
- Default lambda hashing algorithm was changed to
- CLI:
- CLI params put before command tokens are no longer recgonized (e.g.
sls -f <function-name> deploy function
will no longer work). In all cases construct CLI args insls <command> <options>
order - Unrecognized CLI options will no longer be supported and will result in an error.
enableLocalInstallationFallback
configuration property is no longer supported.- Remove
studio
command schema - The
--verbose
CLI flag does no longer support-v
alias - Opt-in tab-tab autocompletion feature is removed due to performance and security issues
- CLI params put before command tokens are no longer recgonized (e.g.
- AWS API Gateway:
- Enabling logs or tracing for imported API Gateway will now result in an error instead of warning
- For authorizers with
request
type and caching disabled (resultTtlInSeconds: 0
), theidentitySource
will no longer be set tomethod.request.header.Authorization
by default. - Support for
usagePlan
,resourcePolicy
andapiKeys
onprovider
level is removed. Useprovider.apiGateway
level instead to set them. - Support for
http.request.schema
has been removed and replaced withhttp.request.schemas
.
- AWS HTTP API: Tags from
provider.tags
are applied by default to HTTP API Gateway. - AWS CloudFront: Support for
MinTTL
,MaxTTL
,DefaultTTL
andForwardedValues
oncloudfront.behavior
has been removed. - AWS EventBridge: By default, EventBridge resources now will be deployed using native CloudFormation resources instead of Custom Resources.
- AWS Alexa: Support for simple
alexaSkill
event was removed and nowappId
is required for allalexaSkill
events.- Serverless Components (@serverless/components
) CLI is no longer integrated with Framework CLI. - Dashboard:
tenant
configuration setting is no longer respected. Ensure to rely onorg
instead - Serverless Components v1 (
@serverless/cli
) CLI is no longer integrated with Framework CLI. - Custom nested configuration paths will no longer be supported and such usage will result in an error.
- Object notation is no longer supported for
service
property. Set name directly toservice
. - When creating
Serverless
class instance programatically, bothoptions
andcommands
have to be passed viaconfig
to the constructor. - Duplicate plugin definition in configuration will now result in an error instead of a warning.
- Using
--aws-s3-accelerate
flag will result in an error instead of deprecation when custom S3 bucket is used. - Removed support for
provider.disableDefaultOutputExportNames
- Node.js versions lower than 12 are no longer supported
- Lifecycle events marked as deprecated (in context of v1) are no longer evaluated
Features
- Variables: Remove old variables resolver (#10512) (9bf6c16) (Mariusz Nowak)
- Packaging: Deprecate
package.include
andpackage.exclude
(#10348) (aa4f9e3) (Mariusz Nowak) - CLI:
- Unconditionally fallback when local installation found (#10503) (137554c) (Mariusz Nowak)
- Simplify
logs
command output (#10203) (d4124a3) (Piotr Grzesik) - Deprecate support for
deploy -f
alias (#10346) (09c9ea3) (Mariusz Nowak) - Deprecate missing options schema (#10394) (0db9c49) (Mariusz Nowak)
- Deprecate recognition of
projectDir
configuration setting (#10511) (00fcd83) (Mariusz Nowak) - Global
--debug
flag for debug logging (#10197) (3b4f267) (Mariusz Nowak) - Global
--verbose
flag for verbose logging (#10197) (2eef264) (Mariusz Nowak) - Register
-v
as global--version
alias (#10332) (211db81) (Mariusz Nowak) - Remove
-v
alias for--verbose
flag (#10153) (03b77c0) (Mariusz Nowak) - Remove support for unrecognized cli options (#10172) (7c2b2ea) (Piotr Grzesik)
- Simplify CLI args parsing to
<command> <options>
format (#10332) (8229812) (Mariusz Nowak) - Support
serverless-tencent
CLI (#10305) (10db944) (Mariusz Nowak) - Do not decorate
cli.log
logs (#10196) (1f44227) (Mariusz Nowak) - Expose
sls doctor
command (#10504) (d403bfc) (Mariusz Nowak) - Remove
studio
command schema (#10191) (7f1e7e1) (Piotr Grzesik) - Remove tab autocomplete feature (#10414) (519ce0c) (Mariusz Nowak)
- AWS Lambda:
- Change default hashing algorithm (#10255) (775debf) (Piotr Grzesik)
- Change default runtime to
nodejs14.x
(#10147) (30e99fb) (Piotr Grzesik) - Remove support for
awsKmsKeyArn
setting (#10146) (6de37bf) (Piotr Grzesik) - Remove support for obsolete runtimes (#10207) (23cfb63) (Piotr Grzesik)
- AWS HTTP API:
- Always apply
provider.tags
to HTTP API (#10141) (b34d549) (Piotr Grzesik) - Deprecate
provider.httpApi.useProviderTags
(#105) (fee410a) (Piotr Grzesik)
- Always apply
- AWS API Gateway:
- Change default identity source for authorizers (#10168) (1139255) (Piotr Grzesik)
- Error on tracing or logs set for external API (#10198) (64ea6e5) (Piotr Grzesik)
- Remove API specific settings from
provider
(#10157) (99941f0) (Piotr Grzesik) - Remove support for
request.schema
(#10143) (b8019d8) (Piotr Grzesik)
- AWS CloudFront: Remove support for deprecated
behavior
props (#10149) (c22277f) (Piotr Grzesik) - AWS EventBridge: Change default deployment method to native CF (#10164) (46956f3) (Piotr Grzesik)
- AWS IAM: Deprecate IAM settings grouped directly at
provider
(#10348) (d7fd239) (Piotr Grzesik) - Plugins: Pass log writers to plugin constructor (#10140) (57079b7) (Mariusz Nowak)
- Config Schema: Deprecate
warn
as a validation mode default (#10348) (6e27cc1) (Mariusz Nowak) - Standalone: Upgrade
npm
to v8 (#10349) (6bfdc0c) (Mariusz Nowak) - Dashboard: Drop support for
tenant
(#10525) (9894875) (Mariusz Nowak) - AWS Alexa: Remove support for alexaSkill without appId (#10142) (a9edd06) (Piotr Grzesik)
- Disallow custom nested configuration path (#10205) (aeb9a57) (Piotr Grzesik)
- Error instead of warning when missing
commands
oroptions
(#10158) (f86f691) (Piotr Grzesik) - Remove
@serverless/cli
CLI integration (#10462) (396cfb9) (Mariusz Nowak) - Remove
@serverless/components
CLI integration (#10327) (3395395) (Mariusz Nowak) - Remove support for
provider.disableDefaultOutputExportNames
(#10148) (a9cd331) (Piotr Grzesik) - Remove support for Node v10 (#10186) (90f00b7) (Piotr Grzesik)
- Remove support for object notation for
service
(#10156) (bccd188) (Piotr Grzesik) - Restrict stage name with pattern (c8c9f49) (Mariusz Nowak)
- Support
params
configuration (#10400) (4675b57) (Mariusz Nowak) - Throw error on duplicated plugin definition (#10150) (d3aca0a) (Piotr Grzesik)
- Throw for
--aws-s3-accelerate
when custom bucket used (#10151) (b7d48e5) (Piotr Grzesik)
Maintenance Improvements
- AWS Deploy: Use change sets in CF deployments (#10390) (e2c65a2) (Piotr Grzesik)
- CLI Onboarding: Download templates from v3 examples branch (#10482) (ded1b0e) (Piotr Grzesik)
- CLI:
- Convert
isLocallyInstalled
to export result directly (#10503) (ad0bbb0) (Mariusz Nowak) - Export resolved local installation path directly (#10503) (fb3b39a) (Mariusz Nowak)
- Improve post install log to reflect modern style (#10418) (843764b) (Mariusz Nowak)
- Improve progress for CloudFormation updates (#10458) (14b1443) (Piotr Grzesik)
- Seclude
paramRegExp
(#10346) (703e40f) (Mariusz Nowak) - Seclude uncaught exception handling (#10542) (b4bd0d4) (Mariusz Nowak)
- Unify finalization of a process handling (#10542) (29357f4) (Mariusz Nowak)
- Move
isLocalyInstalled
util to CLI context (#105) (3dc8395) (Mariusz Nowak)
- Convert
- Config Schema:
- Upgrade
ajv
tov8
along with related packages (#10440) (15cd724) (Piotr Grzesik) - Do not rely on
ajv-keywords
(#10490) (#10490) (4a22a4e) (Piotr Grzesik)
- Upgrade
- Telemetry: Include
paramsCount
in telemetry (#10460) (dd721b0) (Piotr Grzesik) - Rely on
require.resolve
to detect wether module exist (#10503) (040be5f) (Mariusz Nowak) - Remove
legacy
logs (#10527) (a92ab91) (Piotr Grzesik) - Remove
lib/classes/Error.js
(#10563) (44391fa) (Mariusz Nowak) - Remove evaluation of deprecated lifecycle events (#10345) (34bb51e) (Mariusz Nowak)
- Remove internal
suppressLogIfPrintCommand
method (#10526) (584286e) (Mariusz Nowak) - Unify file naming convention (#10563) (Mariusz Nowak)
- Replace
ncjsm/resolve
usage with nativecreateRequire
(#10503) (d18efc2) (Mariusz Nowak) - Adapt to rename in
@serverless/dashboard-plugin
(#10543) (88234a5) (Mariusz Nowak) - Upgrade
@serverless/utils
to v6 (74d9c70) (Mariusz Nowak)