Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions docs/cli-reference/print.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ custom:

provider:
name: aws
runtime: nodejs18.x
runtime: nodejs20.x

functions:
hello:
Expand All @@ -53,7 +53,7 @@ custom:
bucketName: test
provider:
name: aws
runtime: nodejs18.x
runtime: nodejs20.x
stage: dev # <-- Resolved
functions:
hello:
Expand Down
4 changes: 2 additions & 2 deletions docs/events/apigateway.md
Original file line number Diff line number Diff line change
Expand Up @@ -1456,7 +1456,7 @@ service: my-api

provider:
name: aws
runtime: nodejs18.x
runtime: nodejs20.x
stage: dev
region: eu-west-2

Expand Down Expand Up @@ -1645,7 +1645,7 @@ Resource policies are policy documents that are used to control the invocation o
```yml
provider:
name: aws
runtime: nodejs18.x
runtime: nodejs20.x

apiGateway:
resourcePolicy:
Expand Down
2 changes: 1 addition & 1 deletion docs/events/websocket.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ service: serverless-ws-test

provider:
name: aws
runtime: nodejs18.x
runtime: nodejs20.x
websocketsApiName: custom-websockets-api-name
websocketsApiRouteSelectionExpression: $request.body.action # custom routes are selected by the value of the action property in the body
websocketsDescription: Custom Serverless Websockets
Expand Down
4 changes: 2 additions & 2 deletions docs/guides/credentials.md
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ You can even set up different profiles for different accounts, which can be used
service: new-service
provider:
name: aws
runtime: nodejs18.x
runtime: nodejs20.x
stage: dev
profile: devProfile
```
Expand Down Expand Up @@ -175,7 +175,7 @@ This example `serverless.yml` snippet will load the profile depending upon the s
service: new-service
provider:
name: aws
runtime: nodejs18.x
runtime: nodejs20.x
profile: ${self:custom.profiles.${sls:stage}}
custom:
profiles:
Expand Down
14 changes: 7 additions & 7 deletions docs/guides/functions.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ service: myService

provider:
name: aws
runtime: nodejs18.x
runtime: nodejs20.x
runtimeManagement: auto # optional, set how Lambda controls all functions runtime. AWS default is auto; this can either be 'auto' or 'onFunctionUpdate'. For 'manual', see example in hello function below (syntax for both is identical)
memorySize: 512 # optional, in MB, default is 1024
timeout: 10 # optional, in seconds, default is 6
Expand Down Expand Up @@ -52,7 +52,7 @@ service: myService

provider:
name: aws
runtime: nodejs18.x
runtime: nodejs20.x

functions:
functionOne:
Expand All @@ -72,7 +72,7 @@ service: myService

provider:
name: aws
runtime: nodejs18.x
runtime: nodejs20.x
memorySize: 512 # will be inherited by all functions

functions:
Expand All @@ -88,7 +88,7 @@ service: myService

provider:
name: aws
runtime: nodejs18.x
runtime: nodejs20.x

functions:
functionOne:
Expand Down Expand Up @@ -124,7 +124,7 @@ service: myService

provider:
name: aws
runtime: nodejs18.x
runtime: nodejs20.x
iam:
role:
statements: # permissions for all of your functions can be set here
Expand Down Expand Up @@ -727,7 +727,7 @@ service: service

provider:
name: aws
runtime: nodejs18.x
runtime: nodejs20.x

functions:
hello:
Expand Down Expand Up @@ -780,7 +780,7 @@ service: myService

provider:
name: aws
runtime: nodejs18.x
runtime: nodejs20.x
tracing:
lambda: true
```
Expand Down
4 changes: 2 additions & 2 deletions docs/guides/serverless.yml.md
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ Some function settings can be defined for all functions inside the `provider` ke
# serverless.yml

provider:
runtime: nodejs18.x
runtime: nodejs20.x
runtimeManagement: auto # optional, set how Lambda controls all functions runtime. AWS default is auto; this can either be 'auto' or 'onFunctionUpdate'. For 'manual', see example in hello function below (syntax for both is identical
# Default memory size for functions (default: 1024MB)
memorySize: 512
Expand Down Expand Up @@ -607,7 +607,7 @@ functions:
# Container image to use. Cannot be used with 'handler'.
# Can be the URI of an image in ECR, or the name of an image defined in 'provider.ecr.images'
image: baseimage
runtime: nodejs18.x
runtime: nodejs20.x
runtimeManagement:
mode: manual # syntax required for manual, mode property also supports 'auto' or 'onFunctionUpdate' (see provider.runtimeManagement)
arn: <aws runtime arn> # required when mode is manual
Expand Down
6 changes: 3 additions & 3 deletions docs/guides/services.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ service: users

provider:
name: aws
runtime: nodejs18.x
runtime: nodejs20.x
stage: dev # Set the default stage used. Default is dev
region: us-east-1 # Overwrite the default region used. Default is us-east-1
profile: production # The default profile to use with this service
Expand Down Expand Up @@ -164,7 +164,7 @@ service: users

provider:
name: aws
runtime: nodejs18.x
runtime: nodejs20.x
memorySize: 512

Expand All @@ -181,7 +181,7 @@ service: users

provider:
name: aws
runtime: nodejs18.x
runtime: nodejs20.x
memorySize: 512

Expand Down
2 changes: 1 addition & 1 deletion docs/guides/variables.md
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ You can add such custom output to CloudFormation stack. For example:
service: another-service
provider:
name: aws
runtime: nodejs18.x
runtime: nodejs20.x
region: ap-northeast-1
memorySize: 512
functions:
Expand Down
2 changes: 1 addition & 1 deletion lib/plugins/aws/custom-resources/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ async function addCustomResourceToService(awsProvider, resourceName, iamRoleStat
});
}

let runtimeVersion = 'nodejs18.x';
let runtimeVersion = 'nodejs20.x';
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

revert

const providerRuntime = awsProvider.getRuntime();
if (providerRuntime.startsWith('nodejs')) {
runtimeVersion = providerRuntime;
Expand Down
2 changes: 1 addition & 1 deletion lib/plugins/package/lib/package-service.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ module.exports = {
},

getRuntime(runtime) {
const defaultRuntime = 'nodejs18.x';
const defaultRuntime = 'nodejs20.x';
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

revert

return runtime || this.serverless.service.provider.runtime || defaultRuntime;
},

Expand Down
2 changes: 1 addition & 1 deletion test/fixtures/cli/variables/serverless.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ configValidationMode: error

provider:
name: aws
runtime: nodejs18.x
runtime: nodejs20.x

custom:
importedFile: ${file(config.json)}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ frameworkVersion: '*'

provider:
name: aws
runtime: nodejs18.x
runtime: nodejs20.x
versionFunctions: false
apiGateway:
shouldStartNameWithService: true
Expand Down
2 changes: 1 addition & 1 deletion test/fixtures/programmatic/api-gateway/serverless.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ frameworkVersion: '*'

provider:
name: aws
runtime: nodejs18.x
runtime: nodejs20.x
apiGateway:
shouldStartNameWithService: true

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ frameworkVersion: '*'

provider:
name: aws
runtime: nodejs18.x
runtime: nodejs20.x

functions:
fn1:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ configValidationMode: error

provider:
name: aws
runtime: nodejs18.x
runtime: nodejs20.x
versionFunctions: false

functions:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ service: configSchemaExtensionsError

provider:
name: someProvider
runtime: nodejs18.x
runtime: nodejs20.x

configValidationMode: error
frameworkVersion: '*'
Expand Down
2 changes: 1 addition & 1 deletion test/fixtures/programmatic/curated-plugins/serverless.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ custom:

provider:
name: aws
runtime: nodejs18.x
runtime: nodejs20.x

functions:
function:
Expand Down
2 changes: 1 addition & 1 deletion test/fixtures/programmatic/ecr/serverless.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ frameworkVersion: '*'

provider:
name: aws
runtime: nodejs18.x
runtime: nodejs20.x
ecr:
images:
baseimage:
Expand Down
2 changes: 1 addition & 1 deletion test/fixtures/programmatic/event-bridge/serverless.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ configValidationMode: error

provider:
name: aws
runtime: nodejs18.x
runtime: nodejs20.x
versionFunctions: false

functions:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ frameworkVersion: '*'

provider:
name: aws
runtime: nodejs18.x
runtime: nodejs20.x
versionFunctions: false

functions:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ frameworkVersion: '*'

provider:
name: aws
runtime: nodejs18.x
runtime: nodejs20.x

functions:
foo:
Expand Down
2 changes: 1 addition & 1 deletion test/fixtures/programmatic/function-efs/serverless.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ configValidationMode: error

provider:
name: aws
runtime: nodejs18.x
runtime: nodejs20.x
versionFunctions: false

functions:
Expand Down
2 changes: 1 addition & 1 deletion test/fixtures/programmatic/function-layers/serverless.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
service: service
provider:
name: aws
runtime: nodejs18.x
runtime: nodejs20.x

layers:
testLayer:
Expand Down
2 changes: 1 addition & 1 deletion test/fixtures/programmatic/function-msk/serverless.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ frameworkVersion: '*'

provider:
name: aws
runtime: nodejs18.x
runtime: nodejs20.x
versionFunctions: false

functions:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ frameworkVersion: '*'

provider:
name: aws
runtime: nodejs18.x
runtime: nodejs20.x
versionFunctions: false

functions:
Expand Down
2 changes: 1 addition & 1 deletion test/fixtures/programmatic/function/serverless.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ frameworkVersion: '*'

provider:
name: aws
runtime: nodejs18.x
runtime: nodejs20.x

functions:
basic:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ frameworkVersion: '*'

provider:
name: aws
runtime: nodejs18.x
runtime: nodejs20.x

functions:
foo:
Expand Down
2 changes: 1 addition & 1 deletion test/fixtures/programmatic/http-api-export/serverless.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ frameworkVersion: '*'

provider:
name: aws
runtime: nodejs18.x
runtime: nodejs20.x

resources:
Resources:
Expand Down
2 changes: 1 addition & 1 deletion test/fixtures/programmatic/http-api/serverless.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ frameworkVersion: '*'

provider:
name: aws
runtime: nodejs18.x
runtime: nodejs20.x
logRetentionInDays: 14

functions:
Expand Down
2 changes: 1 addition & 1 deletion test/fixtures/programmatic/invocation/serverless.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ frameworkVersion: '*'

provider:
name: aws
runtime: nodejs18.x
runtime: nodejs20.x

functions:
callback:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ frameworkVersion: '*'

provider:
name: aws
runtime: nodejs18.x
runtime: nodejs20.x
versionFunctions: false

functions:
Expand Down
2 changes: 1 addition & 1 deletion test/fixtures/programmatic/iot/serverless.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ configValidationMode: error

provider:
name: aws
runtime: nodejs18.x
runtime: nodejs20.x
versionFunctions: false

functions:
Expand Down
Loading