diff --git a/docs/providers/aws/cli-reference/print.md b/docs/providers/aws/cli-reference/print.md index 376d26bfd..7b1a3ed13 100644 --- a/docs/providers/aws/cli-reference/print.md +++ b/docs/providers/aws/cli-reference/print.md @@ -44,7 +44,7 @@ custom: provider: name: aws - runtime: nodejs10.x + runtime: nodejs12.x stage: ${opt:stage, "dev"} functions: @@ -68,7 +68,7 @@ custom: bucketName: test provider: name: aws - runtime: nodejs10.x + runtime: nodejs12.x stage: dev # <-- Resolved functions: hello: diff --git a/docs/providers/aws/events/apigateway.md b/docs/providers/aws/events/apigateway.md index 56fef266e..aa43826ed 100644 --- a/docs/providers/aws/events/apigateway.md +++ b/docs/providers/aws/events/apigateway.md @@ -1266,7 +1266,7 @@ service: my-api provider: name: aws - runtime: nodejs10.x + runtime: nodejs12.x stage: dev region: eu-west-2 @@ -1454,7 +1454,7 @@ Resource policies are policy documents that are used to control the invocation o ```yml provider: name: aws - runtime: nodejs10.x + runtime: nodejs12.x resourcePolicy: - Effect: Allow diff --git a/docs/providers/aws/events/websocket.md b/docs/providers/aws/events/websocket.md index b448748d2..bc5aa990a 100644 --- a/docs/providers/aws/events/websocket.md +++ b/docs/providers/aws/events/websocket.md @@ -63,7 +63,7 @@ service: serverless-ws-test provider: name: aws - runtime: nodejs10.x + runtime: nodejs12.x websocketsApiName: custom-websockets-api-name websocketsApiRouteSelectionExpression: $request.body.action # custom routes are selected by the value of the action property in the body diff --git a/docs/providers/aws/examples/hello-world/node/serverless.yml b/docs/providers/aws/examples/hello-world/node/serverless.yml index 4d44fe7c3..909cabc93 100644 --- a/docs/providers/aws/examples/hello-world/node/serverless.yml +++ b/docs/providers/aws/examples/hello-world/node/serverless.yml @@ -3,7 +3,7 @@ service: hello-world # Service Name provider: name: aws - runtime: nodejs10.x + runtime: nodejs12.x functions: helloWorld: diff --git a/docs/providers/aws/guide/credentials.md b/docs/providers/aws/guide/credentials.md index 7f7d45816..a77f0a743 100644 --- a/docs/providers/aws/guide/credentials.md +++ b/docs/providers/aws/guide/credentials.md @@ -149,7 +149,7 @@ You can even set up different profiles for different accounts, which can be used service: new-service provider: name: aws - runtime: nodejs10.x + runtime: nodejs12.x stage: dev profile: devProfile ``` @@ -194,7 +194,7 @@ This example `serverless.yml` snippet will load the profile depending upon the s service: new-service provider: name: aws - runtime: nodejs10.x + runtime: nodejs12.x stage: ${opt:stage, self:custom.defaultStage} profile: ${self:custom.profiles.${self:provider.stage}} custom: diff --git a/docs/providers/aws/guide/functions.md b/docs/providers/aws/guide/functions.md index ca1643cc8..25870dcce 100644 --- a/docs/providers/aws/guide/functions.md +++ b/docs/providers/aws/guide/functions.md @@ -26,7 +26,7 @@ service: myService provider: name: aws - runtime: nodejs10.x + runtime: nodejs12.x memorySize: 512 # optional, in MB, default is 1024 timeout: 10 # optional, in seconds, default is 6 versionFunctions: false # optional, default is true @@ -61,7 +61,7 @@ service: myService provider: name: aws - runtime: nodejs10.x + runtime: nodejs12.x functions: functionOne: @@ -81,7 +81,7 @@ service: myService provider: name: aws - runtime: nodejs10.x + runtime: nodejs12.x memorySize: 512 # will be inherited by all functions functions: @@ -97,7 +97,7 @@ service: myService provider: name: aws - runtime: nodejs10.x + runtime: nodejs12.x functions: functionOne: @@ -133,7 +133,7 @@ service: myService provider: name: aws - runtime: nodejs10.x + runtime: nodejs12.x iamRoleStatements: # permissions for all of your functions can be set here - Effect: Allow Action: # Gives permission to DynamoDB tables in a specific region @@ -390,7 +390,7 @@ service: service provider: name: aws - runtime: nodejs10.x + runtime: nodejs12.x functions: hello: @@ -443,7 +443,7 @@ service: myService provider: name: aws - runtime: nodejs10.x + runtime: nodejs12.x tracing: lambda: true ``` diff --git a/docs/providers/aws/guide/serverless.yml.md b/docs/providers/aws/guide/serverless.yml.md index 948e6777b..a5ee28f9d 100644 --- a/docs/providers/aws/guide/serverless.yml.md +++ b/docs/providers/aws/guide/serverless.yml.md @@ -27,7 +27,7 @@ frameworkVersion: '>=1.0.0 <2.0.0' provider: name: aws - runtime: nodejs10.x + runtime: nodejs12.x stage: ${opt:stage, 'dev'} # Set the default stage used. Default is dev region: ${opt:region, 'us-east-1'} # Overwrite the default region used. Default is us-east-1 stackName: custom-stack-name # Use a custom name for the CloudFormation stack @@ -164,7 +164,7 @@ functions: description: My function # The description of your function. memorySize: 512 # memorySize for this specific function. reservedConcurrency: 5 # optional, reserved concurrency limit for this function. By default, AWS uses account concurrency limit - runtime: nodejs10.x # Runtime for this specific function. Overrides the default which is set on the provider level + runtime: nodejs12.x # Runtime for this specific function. Overrides the default which is set on the provider level timeout: 10 # Timeout for this specific function. Overrides the default set above. role: arn:aws:iam::XXXXXX:role/role # IAM role which will be used for this function onError: arn:aws:sns:us-east-1:XXXXXX:sns-topic # Optional SNS topic / SQS arn (Ref, Fn::GetAtt and Fn::ImportValue are supported as well) which will be used for the DeadLetterConfig diff --git a/docs/providers/aws/guide/services.md b/docs/providers/aws/guide/services.md index c539493ae..740432bc6 100644 --- a/docs/providers/aws/guide/services.md +++ b/docs/providers/aws/guide/services.md @@ -103,7 +103,7 @@ service: users provider: name: aws - runtime: nodejs10.x + runtime: nodejs12.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 stackName: my-custom-stack-name-${self:provider.stage} # Overwrite default CloudFormation stack name. Default is ${self:service}-${self:provider.stage} @@ -233,7 +233,7 @@ service: users provider: name: aws - runtime: nodejs10.x + runtime: nodejs12.x memorySize: 512 … @@ -250,7 +250,7 @@ service: users provider: name: aws - runtime: nodejs10.x + runtime: nodejs12.x memorySize: 512 … diff --git a/docs/providers/aws/guide/variables.md b/docs/providers/aws/guide/variables.md index 08078cf12..6b4f21919 100644 --- a/docs/providers/aws/guide/variables.md +++ b/docs/providers/aws/guide/variables.md @@ -196,7 +196,7 @@ You can add such custom output to CloudFormation stack. For example: service: another-service provider: name: aws - runtime: nodejs10.x + runtime: nodejs12.x region: ap-northeast-1 memorySize: 512 functions: @@ -621,7 +621,7 @@ service: new-service provider: name: aws - runtime: nodejs10.x + runtime: nodejs12.x variableSyntax: "\\${{([ ~:a-zA-Z0-9._@\\'\",\\-\\/\\(\\)]+?)}}" # notice the double quotes for yaml to ignore the escape characters! # variableSyntax: "\\${((?!AWS)[ ~:a-zA-Z0-9._@'\",\\-\\/\\(\\)]+?)}" # Use this for allowing CloudFormation Pseudo-Parameters in your serverless.yml -- e.g. ${AWS::Region}. All other Serverless variables work as usual. diff --git a/lib/classes/Service.test.js b/lib/classes/Service.test.js index 3b0b398d1..88bf11f43 100644 --- a/lib/classes/Service.test.js +++ b/lib/classes/Service.test.js @@ -97,14 +97,14 @@ describe('Service', () => { const data = { provider: { name: 'testProvider', - runtime: 'nodejs10.x', + runtime: 'nodejs12.x', }, }; const serviceInstance = new Service(serverless, data); expect(serviceInstance.provider.name).to.be.equal('testProvider'); - expect(serviceInstance.provider.runtime).to.be.equal('nodejs10.x'); + expect(serviceInstance.provider.runtime).to.be.equal('nodejs12.x'); }); }); diff --git a/lib/classes/Utils.test.js b/lib/classes/Utils.test.js index 43ab87ed3..26cc7f109 100644 --- a/lib/classes/Utils.test.js +++ b/lib/classes/Utils.test.js @@ -747,7 +747,7 @@ describe('Utils', () => { service: 'new-service', provider: { name: 'aws', - runtime: 'nodejs10.x', + runtime: 'nodejs12.x', stage: 'dev', region: 'us-east-1', variableSyntax: '\\${foo}', diff --git a/lib/plugins/aws/customResources/index.js b/lib/plugins/aws/customResources/index.js index 3b84d4663..b97b5cc1d 100644 --- a/lib/plugins/aws/customResources/index.js +++ b/lib/plugins/aws/customResources/index.js @@ -174,7 +174,7 @@ function addCustomResourceToService(awsProvider, resourceName, iamRoleStatements FunctionName: absoluteFunctionName, Handler, MemorySize: 1024, - Runtime: 'nodejs10.x', + Runtime: 'nodejs12.x', Timeout: 180, }, DependsOn: [], diff --git a/lib/plugins/aws/customResources/index.test.js b/lib/plugins/aws/customResources/index.test.js index 639f25cd8..5ecfffd40 100644 --- a/lib/plugins/aws/customResources/index.test.js +++ b/lib/plugins/aws/customResources/index.test.js @@ -125,7 +125,7 @@ describe('#addCustomResourceToService()', () => { Role: { 'Fn::GetAtt': ['IamRoleCustomResourcesLambdaExecution', 'Arn'], }, - Runtime: 'nodejs10.x', + Runtime: 'nodejs12.x', Timeout: 180, }, DependsOn: ['IamRoleCustomResourcesLambdaExecution'], @@ -144,7 +144,7 @@ describe('#addCustomResourceToService()', () => { Role: { 'Fn::GetAtt': ['IamRoleCustomResourcesLambdaExecution', 'Arn'], }, - Runtime: 'nodejs10.x', + Runtime: 'nodejs12.x', Timeout: 180, }, DependsOn: ['IamRoleCustomResourcesLambdaExecution'], @@ -163,7 +163,7 @@ describe('#addCustomResourceToService()', () => { Role: { 'Fn::GetAtt': ['IamRoleCustomResourcesLambdaExecution', 'Arn'], }, - Runtime: 'nodejs10.x', + Runtime: 'nodejs12.x', Timeout: 180, }, DependsOn: ['IamRoleCustomResourcesLambdaExecution'], @@ -290,7 +290,7 @@ describe('#addCustomResourceToService()', () => { Handler: 's3/handler.handler', MemorySize: 1024, Role: cfnRoleArn, - Runtime: 'nodejs10.x', + Runtime: 'nodejs12.x', Timeout: 180, }, DependsOn: [], @@ -307,7 +307,7 @@ describe('#addCustomResourceToService()', () => { Handler: 'cognitoUserPool/handler.handler', MemorySize: 1024, Role: cfnRoleArn, - Runtime: 'nodejs10.x', + Runtime: 'nodejs12.x', Timeout: 180, }, DependsOn: [], @@ -324,7 +324,7 @@ describe('#addCustomResourceToService()', () => { Handler: 'eventBridge/handler.handler', MemorySize: 1024, Role: cfnRoleArn, - Runtime: 'nodejs10.x', + Runtime: 'nodejs12.x', Timeout: 180, }, DependsOn: [], diff --git a/lib/plugins/aws/invokeLocal/index.js b/lib/plugins/aws/invokeLocal/index.js index 43d7756e1..1410aad07 100644 --- a/lib/plugins/aws/invokeLocal/index.js +++ b/lib/plugins/aws/invokeLocal/index.js @@ -37,7 +37,7 @@ class AwsInvokeLocal { getRuntime() { return ( - this.options.functionObj.runtime || this.serverless.service.provider.runtime || 'nodejs10.x' + this.options.functionObj.runtime || this.serverless.service.provider.runtime || 'nodejs12.x' ); } diff --git a/lib/plugins/aws/invokeLocal/index.test.js b/lib/plugins/aws/invokeLocal/index.test.js index c227d3040..afab56b50 100644 --- a/lib/plugins/aws/invokeLocal/index.test.js +++ b/lib/plugins/aws/invokeLocal/index.test.js @@ -400,7 +400,7 @@ describe('AwsInvokeLocal', () => { })); it('should call invokeLocalNodeJs for any node.js runtime version', () => { - awsInvokeLocal.options.functionObj.runtime = 'nodejs10.x'; + awsInvokeLocal.options.functionObj.runtime = 'nodejs12.x'; return awsInvokeLocal.invokeLocal().then(() => { expect(invokeLocalNodeJsStub.calledOnce).to.be.equal(true); expect( @@ -488,8 +488,8 @@ describe('AwsInvokeLocal', () => { }); }); - it('should call invokeLocalDocker if using --docker option with nodejs10.x', () => { - awsInvokeLocal.options.functionObj.runtime = 'nodejs10.x'; + it('should call invokeLocalDocker if using --docker option with nodejs12.x', () => { + awsInvokeLocal.options.functionObj.runtime = 'nodejs12.x'; awsInvokeLocal.options.functionObj.handler = 'handler.foobar'; awsInvokeLocal.options.docker = true; return awsInvokeLocal.invokeLocal().then(() => { @@ -1186,7 +1186,7 @@ describe('AwsInvokeLocal', () => { handler: 'handler.hello', name: 'hello', timeout: 4, - runtime: 'nodejs10.x', + runtime: 'nodejs12.x', environment: { functionVar: 'functionValue', }, @@ -1215,11 +1215,11 @@ describe('AwsInvokeLocal', () => { expect(spawnStub.getCall(0).args).to.deep.equal(['docker', ['version']]); expect(spawnStub.getCall(1).args).to.deep.equal([ 'docker', - ['images', '-q', 'lambci/lambda:nodejs10.x'], + ['images', '-q', 'lambci/lambda:nodejs12.x'], ]); expect(spawnStub.getCall(2).args).to.deep.equal([ 'docker', - ['pull', 'lambci/lambda:nodejs10.x'], + ['pull', 'lambci/lambda:nodejs12.x'], ]); expect(spawnStub.getCall(3).args).to.deep.equal([ 'docker', diff --git a/lib/plugins/aws/package/compile/functions/index.js b/lib/plugins/aws/package/compile/functions/index.js index ee38dc221..647234abf 100644 --- a/lib/plugins/aws/package/compile/functions/index.js +++ b/lib/plugins/aws/package/compile/functions/index.js @@ -170,7 +170,7 @@ class AwsCompileFunctions { const Timeout = Number(functionObject.timeout) || Number(this.serverless.service.provider.timeout) || 6; const Runtime = - functionObject.runtime || this.serverless.service.provider.runtime || 'nodejs10.x'; + functionObject.runtime || this.serverless.service.provider.runtime || 'nodejs12.x'; newFunction.Properties.Handler = Handler; newFunction.Properties.FunctionName = FunctionName; diff --git a/lib/plugins/aws/package/compile/functions/index.test.js b/lib/plugins/aws/package/compile/functions/index.test.js index 8b18edaa4..ce4e6f8ff 100644 --- a/lib/plugins/aws/package/compile/functions/index.test.js +++ b/lib/plugins/aws/package/compile/functions/index.test.js @@ -513,7 +513,7 @@ describe('AwsCompileFunctions', () => { Handler: 'func.function.handler', MemorySize: 1024, Role: { 'Fn::GetAtt': ['IamRoleLambdaExecution', 'Arn'] }, - Runtime: 'nodejs10.x', + Runtime: 'nodejs12.x', Timeout: 6, }, }; @@ -554,7 +554,7 @@ describe('AwsCompileFunctions', () => { Handler: 'func.function.handler', MemorySize: 1024, Role: { 'Fn::GetAtt': ['IamRoleLambdaExecution', 'Arn'] }, - Runtime: 'nodejs10.x', + Runtime: 'nodejs12.x', Timeout: 6, VpcConfig: { SecurityGroupIds: ['xxx'], @@ -598,7 +598,7 @@ describe('AwsCompileFunctions', () => { Handler: 'func.function.handler', MemorySize: 1024, Role: { 'Fn::GetAtt': ['IamRoleLambdaExecution', 'Arn'] }, - Runtime: 'nodejs10.x', + Runtime: 'nodejs12.x', Timeout: 6, VpcConfig: { SecurityGroupIds: ['xxx'], @@ -644,9 +644,12 @@ describe('AwsCompileFunctions', () => { Handler: 'func.function.handler', MemorySize: 1024, Role: { 'Fn::GetAtt': ['IamRoleLambdaExecution', 'Arn'] }, - Runtime: 'nodejs10.x', + Runtime: 'nodejs12.x', Timeout: 6, - Tags: [{ Key: 'foo', Value: 'bar' }, { Key: 'baz', Value: 'qux' }], + Tags: [ + { Key: 'foo', Value: 'bar' }, + { Key: 'baz', Value: 'qux' }, + ], }, }; @@ -686,9 +689,12 @@ describe('AwsCompileFunctions', () => { Handler: 'func.function.handler', MemorySize: 1024, Role: { 'Fn::GetAtt': ['IamRoleLambdaExecution', 'Arn'] }, - Runtime: 'nodejs10.x', + Runtime: 'nodejs12.x', Timeout: 6, - Tags: [{ Key: 'foo', Value: 'bar' }, { Key: 'baz', Value: 'qux' }], + Tags: [ + { Key: 'foo', Value: 'bar' }, + { Key: 'baz', Value: 'qux' }, + ], }, }; @@ -733,7 +739,7 @@ describe('AwsCompileFunctions', () => { Handler: 'func.function.handler', MemorySize: 1024, Role: { 'Fn::GetAtt': ['IamRoleLambdaExecution', 'Arn'] }, - Runtime: 'nodejs10.x', + Runtime: 'nodejs12.x', Timeout: 6, Tags: [ { Key: 'foo', Value: 'bar' }, @@ -835,7 +841,7 @@ describe('AwsCompileFunctions', () => { Handler: 'func.function.handler', MemorySize: 1024, Role: { 'Fn::GetAtt': ['IamRoleLambdaExecution', 'Arn'] }, - Runtime: 'nodejs10.x', + Runtime: 'nodejs12.x', Timeout: 6, DeadLetterConfig: { TargetArn: 'arn:aws:sns:region:accountid:foo', @@ -900,7 +906,7 @@ describe('AwsCompileFunctions', () => { Handler: 'func.function.handler', MemorySize: 1024, Role: { 'Fn::GetAtt': ['IamRoleLambdaExecution', 'Arn'] }, - Runtime: 'nodejs10.x', + Runtime: 'nodejs12.x', Timeout: 6, DeadLetterConfig: { TargetArn: { @@ -942,7 +948,7 @@ describe('AwsCompileFunctions', () => { Handler: 'func.function.handler', MemorySize: 1024, Role: { 'Fn::GetAtt': ['IamRoleLambdaExecution', 'Arn'] }, - Runtime: 'nodejs10.x', + Runtime: 'nodejs12.x', Timeout: 6, DeadLetterConfig: { TargetArn: { @@ -984,7 +990,7 @@ describe('AwsCompileFunctions', () => { Handler: 'func.function.handler', MemorySize: 1024, Role: { 'Fn::GetAtt': ['IamRoleLambdaExecution', 'Arn'] }, - Runtime: 'nodejs10.x', + Runtime: 'nodejs12.x', Timeout: 6, DeadLetterConfig: { TargetArn: { @@ -1026,7 +1032,7 @@ describe('AwsCompileFunctions', () => { Handler: 'func.function.handler', MemorySize: 1024, Role: { 'Fn::GetAtt': ['IamRoleLambdaExecution', 'Arn'] }, - Runtime: 'nodejs10.x', + Runtime: 'nodejs12.x', Timeout: 6, DeadLetterConfig: { TargetArn: 'arn:aws:sns:region:accountid:foo', @@ -1136,7 +1142,7 @@ describe('AwsCompileFunctions', () => { Handler: 'func.function.handler', MemorySize: 1024, Role: { 'Fn::GetAtt': ['IamRoleLambdaExecution', 'Arn'] }, - Runtime: 'nodejs10.x', + Runtime: 'nodejs12.x', Timeout: 6, KmsKeyArn: 'arn:aws:kms:region:accountid:foo/bar', }, @@ -1180,7 +1186,7 @@ describe('AwsCompileFunctions', () => { Handler: 'func1.function.handler', MemorySize: 1024, Role: { 'Fn::GetAtt': ['IamRoleLambdaExecution', 'Arn'] }, - Runtime: 'nodejs10.x', + Runtime: 'nodejs12.x', Timeout: 6, KmsKeyArn: 'arn:aws:kms:region:accountid:foo/function', }, @@ -1198,7 +1204,7 @@ describe('AwsCompileFunctions', () => { Handler: 'func2.function.handler', MemorySize: 1024, Role: { 'Fn::GetAtt': ['IamRoleLambdaExecution', 'Arn'] }, - Runtime: 'nodejs10.x', + Runtime: 'nodejs12.x', Timeout: 6, KmsKeyArn: 'arn:aws:kms:region:accountid:foo/service', }, @@ -1252,7 +1258,7 @@ describe('AwsCompileFunctions', () => { Handler: 'func.function.handler', MemorySize: 1024, Role: { 'Fn::GetAtt': ['IamRoleLambdaExecution', 'Arn'] }, - Runtime: 'nodejs10.x', + Runtime: 'nodejs12.x', Timeout: 6, KmsKeyArn: 'arn:aws:kms:region:accountid:foo/bar', }, @@ -1301,7 +1307,7 @@ describe('AwsCompileFunctions', () => { Handler: 'func.function.handler', MemorySize: 1024, Role: { 'Fn::GetAtt': ['IamRoleLambdaExecution', 'Arn'] }, - Runtime: 'nodejs10.x', + Runtime: 'nodejs12.x', Timeout: 6, KmsKeyArn: 'arn:aws:kms:region:accountid:foo/bar', }, @@ -1366,7 +1372,7 @@ describe('AwsCompileFunctions', () => { Handler: 'func.function.handler', MemorySize: 1024, Role: { 'Fn::GetAtt': ['IamRoleLambdaExecution', 'Arn'] }, - Runtime: 'nodejs10.x', + Runtime: 'nodejs12.x', Timeout: 6, TracingConfig: { Mode: 'Active', @@ -1413,7 +1419,7 @@ describe('AwsCompileFunctions', () => { Handler: 'func1.function.handler', MemorySize: 1024, Role: { 'Fn::GetAtt': ['IamRoleLambdaExecution', 'Arn'] }, - Runtime: 'nodejs10.x', + Runtime: 'nodejs12.x', Timeout: 6, TracingConfig: { Mode: 'Active', @@ -1433,7 +1439,7 @@ describe('AwsCompileFunctions', () => { Handler: 'func2.function.handler', MemorySize: 1024, Role: { 'Fn::GetAtt': ['IamRoleLambdaExecution', 'Arn'] }, - Runtime: 'nodejs10.x', + Runtime: 'nodejs12.x', Timeout: 6, TracingConfig: { Mode: 'PassThrough', @@ -1489,7 +1495,7 @@ describe('AwsCompileFunctions', () => { Handler: 'func.function.handler', MemorySize: 1024, Role: { 'Fn::GetAtt': ['IamRoleLambdaExecution', 'Arn'] }, - Runtime: 'nodejs10.x', + Runtime: 'nodejs12.x', Timeout: 6, TracingConfig: { Mode: 'Active', @@ -1540,7 +1546,7 @@ describe('AwsCompileFunctions', () => { Handler: 'func.function.handler', MemorySize: 1024, Role: { 'Fn::GetAtt': ['IamRoleLambdaExecution', 'Arn'] }, - Runtime: 'nodejs10.x', + Runtime: 'nodejs12.x', Timeout: 6, TracingConfig: { Mode: 'PassThrough', @@ -1592,7 +1598,7 @@ describe('AwsCompileFunctions', () => { Handler: 'func.function.handler', MemorySize: 1024, Role: { 'Fn::GetAtt': ['IamRoleLambdaExecution', 'Arn'] }, - Runtime: 'nodejs10.x', + Runtime: 'nodejs12.x', Timeout: 6, Environment: { Variables: { @@ -1639,7 +1645,7 @@ describe('AwsCompileFunctions', () => { Handler: 'func.function.handler', MemorySize: 1024, Role: { 'Fn::GetAtt': ['IamRoleLambdaExecution', 'Arn'] }, - Runtime: 'nodejs10.x', + Runtime: 'nodejs12.x', Timeout: 6, Environment: { Variables: { @@ -1685,7 +1691,7 @@ describe('AwsCompileFunctions', () => { Handler: 'func.function.handler', MemorySize: 1024, Role: { 'Fn::GetAtt': ['IamRoleLambdaExecution', 'Arn'] }, - Runtime: 'nodejs10.x', + Runtime: 'nodejs12.x', Timeout: 6, Environment: { Variables: { @@ -1734,7 +1740,7 @@ describe('AwsCompileFunctions', () => { Handler: 'func.function.handler', MemorySize: 1024, Role: { 'Fn::GetAtt': ['IamRoleLambdaExecution', 'Arn'] }, - Runtime: 'nodejs10.x', + Runtime: 'nodejs12.x', Timeout: 6, Environment: { Variables: { @@ -1843,7 +1849,7 @@ describe('AwsCompileFunctions', () => { Handler: 'func.function.handler', MemorySize: 128, Role: { 'Fn::GetAtt': ['IamRoleLambdaExecution', 'Arn'] }, - Runtime: 'nodejs10.x', + Runtime: 'nodejs12.x', Timeout: 10, }, }; @@ -1898,7 +1904,7 @@ describe('AwsCompileFunctions', () => { } ); - it('should default to the nodejs10.x runtime when no provider runtime is given', () => { + it('should default to the nodejs12.x runtime when no provider runtime is given', () => { const s3Folder = awsCompileFunctions.serverless.service.package.artifactDirectoryName; const s3FileName = awsCompileFunctions.serverless.service.package.artifact .split(path.sep) @@ -1922,7 +1928,7 @@ describe('AwsCompileFunctions', () => { Handler: 'func.function.handler', MemorySize: 1024, Role: { 'Fn::GetAtt': ['IamRoleLambdaExecution', 'Arn'] }, - Runtime: 'nodejs10.x', + Runtime: 'nodejs12.x', Timeout: 6, }, }; @@ -2047,12 +2053,12 @@ describe('AwsCompileFunctions', () => { const expectedOutputs = { FuncLambdaFunctionQualifiedArn: { Description: 'Current Lambda function version', - Value: { Ref: 'FuncLambdaVersionpcyXz9PqN5xesfBZOOhY7t6jhi8kOCyGDknpfuhJ4' }, + Value: { Ref: 'FuncLambdaVersionRk2uCHjn9BWyD0yH8GzU5kTmGVjCc6ZZx46sUUI1LQ' }, }, AnotherFuncLambdaFunctionQualifiedArn: { Description: 'Current Lambda function version', Value: { - Ref: 'AnotherFuncLambdaVersionIo6IWr3BPLeAaVjlRwEGEz4vvDzC43h07eOBY0fXyI', + Ref: 'AnotherFuncLambdaVersionha2TZXucQgvNN4zjzNnEFIaTGAQxdp7jICMvFkl0', }, }, }; @@ -2077,12 +2083,12 @@ describe('AwsCompileFunctions', () => { const expectedOutputs = { FuncLambdaFunctionQualifiedArn: { Description: 'Current Lambda function version', - Value: { Ref: 'FuncLambdaVersionpcyXz9PqN5xesfBZOOhY7t6jhi8kOCyGDknpfuhJ4' }, + Value: { Ref: 'FuncLambdaVersionRk2uCHjn9BWyD0yH8GzU5kTmGVjCc6ZZx46sUUI1LQ' }, }, AnotherFuncLambdaFunctionQualifiedArn: { Description: 'Current Lambda function version', Value: { - Ref: 'AnotherFuncLambdaVersionIo6IWr3BPLeAaVjlRwEGEz4vvDzC43h07eOBY0fXyI', + Ref: 'AnotherFuncLambdaVersionha2TZXucQgvNN4zjzNnEFIaTGAQxdp7jICMvFkl0', }, }, }; @@ -2111,7 +2117,7 @@ describe('AwsCompileFunctions', () => { // Expect different version hash _.set(expectedOutputs, 'FuncLambdaFunctionQualifiedArn', { Description: 'Current Lambda function version', - Value: { Ref: 'FuncLambdaVersionI1xWetHMVQO8bvzGqgmokPl25rtJA0A8g6lZNYdkdg' }, + Value: { Ref: 'FuncLambdaVersionYqfesG4U7X9KW8rtI9WywGLkurgescFGCy7rnMy8o' }, }); expect( @@ -2131,7 +2137,7 @@ describe('AwsCompileFunctions', () => { return expect(awsCompileFunctions.compileFunctions()).to.be.fulfilled.then(() => { expect( awsCompileFunctions.serverless.service.provider.compiledCloudFormationTemplate.Resources - .FuncLambdaVersionBzAYHivcbYLoEZcl7hN9cBrakBNygN0PiUC9UjQVMA.Properties.Description + .FuncLambdaVersionUF9qY6un3qUVhv62q1QPfZm4qaYxyEJXKjFTLIZ5Ig.Properties.Description ).to.equal('Lambda function description'); }); }); @@ -2181,7 +2187,7 @@ describe('AwsCompileFunctions', () => { MemorySize: 1024, ReservedConcurrentExecutions: 5, Role: { 'Fn::GetAtt': ['IamRoleLambdaExecution', 'Arn'] }, - Runtime: 'nodejs10.x', + Runtime: 'nodejs12.x', Timeout: 6, }, }; @@ -2219,7 +2225,7 @@ describe('AwsCompileFunctions', () => { MemorySize: 1024, ReservedConcurrentExecutions: 0, Role: { 'Fn::GetAtt': ['IamRoleLambdaExecution', 'Arn'] }, - Runtime: 'nodejs10.x', + Runtime: 'nodejs12.x', Timeout: 6, }, }; @@ -2268,7 +2274,7 @@ describe('AwsCompileFunctions', () => { const expectedOutputs = { FuncLambdaFunctionQualifiedArn: { Description: 'Current Lambda function version', - Value: { Ref: 'FuncLambdaVersionpcyXz9PqN5xesfBZOOhY7t6jhi8kOCyGDknpfuhJ4' }, + Value: { Ref: 'FuncLambdaVersionRk2uCHjn9BWyD0yH8GzU5kTmGVjCc6ZZx46sUUI1LQ' }, }, }; @@ -2395,7 +2401,7 @@ describe('AwsCompileFunctions', () => { Handler: 'func.function.handler', MemorySize: 1024, Role: { 'Fn::GetAtt': ['IamRoleLambdaExecution', 'Arn'] }, - Runtime: 'nodejs10.x', + Runtime: 'nodejs12.x', Timeout: 6, }, }; @@ -2433,7 +2439,7 @@ describe('AwsCompileFunctions', () => { Handler: 'func.function.handler', MemorySize: 1024, Role: { 'Fn::GetAtt': ['IamRoleLambdaExecution', 'Arn'] }, - Runtime: 'nodejs10.x', + Runtime: 'nodejs12.x', Timeout: 6, Layers: ['arn:aws:xxx:*:*'], }, diff --git a/lib/plugins/aws/package/compile/layers/index.test.js b/lib/plugins/aws/package/compile/layers/index.test.js index 9d9e9e032..f73a13c0f 100644 --- a/lib/plugins/aws/package/compile/layers/index.test.js +++ b/lib/plugins/aws/package/compile/layers/index.test.js @@ -374,7 +374,7 @@ describe('AwsCompileLayers', () => { test: { path: 'layer', description: 'desc', - compatibleRuntimes: ['nodejs10.x'], + compatibleRuntimes: ['nodejs12.x'], licenseInfo: 'GPL', }, }; @@ -387,7 +387,7 @@ describe('AwsCompileLayers', () => { }, LayerName: 'test', Description: 'desc', - CompatibleRuntimes: ['nodejs10.x'], + CompatibleRuntimes: ['nodejs12.x'], LicenseInfo: 'GPL', }, }; diff --git a/lib/plugins/create/templates/aws-alexa-typescript/serverless.yml b/lib/plugins/create/templates/aws-alexa-typescript/serverless.yml index a1c773c82..7b34ad616 100644 --- a/lib/plugins/create/templates/aws-alexa-typescript/serverless.yml +++ b/lib/plugins/create/templates/aws-alexa-typescript/serverless.yml @@ -10,7 +10,7 @@ plugins: provider: name: aws - runtime: nodejs10.x + runtime: nodejs12.x custom: alexa: diff --git a/lib/plugins/create/templates/aws-clojurescript-gradle/serverless.yml b/lib/plugins/create/templates/aws-clojurescript-gradle/serverless.yml index fa7edc6bb..19aebf75e 100644 --- a/lib/plugins/create/templates/aws-clojurescript-gradle/serverless.yml +++ b/lib/plugins/create/templates/aws-clojurescript-gradle/serverless.yml @@ -22,7 +22,7 @@ service: aws-clojurescript-gradle provider: name: aws - runtime: nodejs10.x + runtime: nodejs12.x # you can overwrite defaults here # stage: dev diff --git a/lib/plugins/create/templates/aws-kotlin-nodejs-gradle/serverless.yml b/lib/plugins/create/templates/aws-kotlin-nodejs-gradle/serverless.yml index 725fb4fe3..070b58919 100644 --- a/lib/plugins/create/templates/aws-kotlin-nodejs-gradle/serverless.yml +++ b/lib/plugins/create/templates/aws-kotlin-nodejs-gradle/serverless.yml @@ -22,7 +22,7 @@ service: aws-kotlin-nodejs-gradle # NOTE: update this with your service name provider: name: aws - runtime: nodejs10.x + runtime: nodejs12.x # you can overwrite defaults here # stage: dev diff --git a/lib/plugins/create/templates/aws-nodejs-ecma-script/serverless.yml b/lib/plugins/create/templates/aws-nodejs-ecma-script/serverless.yml index 367db683e..a9c6a2e4a 100644 --- a/lib/plugins/create/templates/aws-nodejs-ecma-script/serverless.yml +++ b/lib/plugins/create/templates/aws-nodejs-ecma-script/serverless.yml @@ -10,7 +10,7 @@ plugins: provider: name: aws - runtime: nodejs10.x + runtime: nodejs12.x functions: first: diff --git a/lib/plugins/create/templates/aws-nodejs-typescript/serverless.yml b/lib/plugins/create/templates/aws-nodejs-typescript/serverless.yml index b00954455..9d376b015 100644 --- a/lib/plugins/create/templates/aws-nodejs-typescript/serverless.yml +++ b/lib/plugins/create/templates/aws-nodejs-typescript/serverless.yml @@ -15,7 +15,7 @@ plugins: provider: name: aws - runtime: nodejs10.x + runtime: nodejs12.x apiGateway: minimumCompressionSize: 1024 # Enable gzip compression for responses > 1 KB environment: diff --git a/lib/plugins/create/templates/aws-nodejs/serverless.yml b/lib/plugins/create/templates/aws-nodejs/serverless.yml index 48923eb4e..706b59d91 100644 --- a/lib/plugins/create/templates/aws-nodejs/serverless.yml +++ b/lib/plugins/create/templates/aws-nodejs/serverless.yml @@ -22,7 +22,7 @@ service: aws-nodejs # NOTE: update this with your service name provider: name: aws - runtime: nodejs10.x + runtime: nodejs12.x # you can overwrite defaults here # stage: dev diff --git a/lib/plugins/create/templates/azure-nodejs/serverless.yml b/lib/plugins/create/templates/azure-nodejs/serverless.yml index 896a65c26..b006071c4 100644 --- a/lib/plugins/create/templates/azure-nodejs/serverless.yml +++ b/lib/plugins/create/templates/azure-nodejs/serverless.yml @@ -20,7 +20,7 @@ service: azure-nodejs # NOTE: update this with your service name provider: name: azure region: West US 2 - runtime: nodejs10.x + runtime: nodejs12.x # prefix: "sample" # prefix of generated resource name # subscriptionId: A356AC8C-E310-44F4-BF85-C7F29044AF99 # stage: dev diff --git a/lib/plugins/create/templates/hello-world/serverless.yml b/lib/plugins/create/templates/hello-world/serverless.yml index a2e0a0fd2..1fbe9e3c1 100644 --- a/lib/plugins/create/templates/hello-world/serverless.yml +++ b/lib/plugins/create/templates/hello-world/serverless.yml @@ -10,7 +10,7 @@ service: serverless-hello-world # The `provider` block defines where your service will be deployed provider: name: aws - runtime: nodejs10.x + runtime: nodejs12.x # The `functions` block defines what code to deploy functions: diff --git a/tests/integration-all/api-gateway/service/serverless.yml b/tests/integration-all/api-gateway/service/serverless.yml index d3a5d6a33..bb4b13a72 100644 --- a/tests/integration-all/api-gateway/service/serverless.yml +++ b/tests/integration-all/api-gateway/service/serverless.yml @@ -2,7 +2,7 @@ service: CHANGE_TO_UNIQUE_PER_RUN provider: name: aws - runtime: nodejs10.x + runtime: nodejs12.x versionFunctions: false apiKeys: - name: CHANGE_TO_UNIQUE_PER_RUN diff --git a/tests/integration-all/cognito-user-pool/service/serverless.yml b/tests/integration-all/cognito-user-pool/service/serverless.yml index 1f10c0d8b..ab8235398 100644 --- a/tests/integration-all/cognito-user-pool/service/serverless.yml +++ b/tests/integration-all/cognito-user-pool/service/serverless.yml @@ -2,7 +2,7 @@ service: CHANGE_TO_UNIQUE_PER_RUN provider: name: aws - runtime: nodejs10.x + runtime: nodejs12.x versionFunctions: false functions: diff --git a/tests/integration-all/event-bridge/service/serverless.yml b/tests/integration-all/event-bridge/service/serverless.yml index 1322d76c2..14c8463c8 100644 --- a/tests/integration-all/event-bridge/service/serverless.yml +++ b/tests/integration-all/event-bridge/service/serverless.yml @@ -2,7 +2,7 @@ service: CHANGE_TO_UNIQUE_PER_RUN provider: name: aws - runtime: nodejs10.x + runtime: nodejs12.x versionFunctions: false functions: diff --git a/tests/integration-all/iot/service/serverless.yml b/tests/integration-all/iot/service/serverless.yml index e3ef807fd..60b870eb5 100644 --- a/tests/integration-all/iot/service/serverless.yml +++ b/tests/integration-all/iot/service/serverless.yml @@ -2,7 +2,7 @@ service: CHANGE_TO_UNIQUE_PER_RUN provider: name: aws - runtime: nodejs10.x + runtime: nodejs12.x versionFunctions: false functions: diff --git a/tests/integration-all/s3/service/serverless.yml b/tests/integration-all/s3/service/serverless.yml index 39ef43078..6105414ca 100644 --- a/tests/integration-all/s3/service/serverless.yml +++ b/tests/integration-all/s3/service/serverless.yml @@ -2,7 +2,7 @@ service: CHANGE_TO_UNIQUE_PER_RUN provider: name: aws - runtime: nodejs10.x + runtime: nodejs12.x versionFunctions: false functions: diff --git a/tests/integration-all/schedule/service/serverless.yml b/tests/integration-all/schedule/service/serverless.yml index 7f4bb9ff8..46b7592de 100644 --- a/tests/integration-all/schedule/service/serverless.yml +++ b/tests/integration-all/schedule/service/serverless.yml @@ -2,7 +2,7 @@ service: CHANGE_TO_UNIQUE_PER_RUN provider: name: aws - runtime: nodejs10.x + runtime: nodejs12.x versionFunctions: false functions: diff --git a/tests/integration-all/sns/service/serverless.yml b/tests/integration-all/sns/service/serverless.yml index 4385537e8..0687fb8a7 100644 --- a/tests/integration-all/sns/service/serverless.yml +++ b/tests/integration-all/sns/service/serverless.yml @@ -2,7 +2,7 @@ service: CHANGE_TO_UNIQUE_PER_RUN provider: name: aws - runtime: nodejs10.x + runtime: nodejs12.x versionFunctions: false functions: diff --git a/tests/integration-all/sqs/service/serverless.yml b/tests/integration-all/sqs/service/serverless.yml index 220d33d9f..2ba491509 100644 --- a/tests/integration-all/sqs/service/serverless.yml +++ b/tests/integration-all/sqs/service/serverless.yml @@ -2,7 +2,7 @@ service: CHANGE_TO_UNIQUE_PER_RUN provider: name: aws - runtime: nodejs10.x + runtime: nodejs12.x versionFunctions: false functions: diff --git a/tests/integration-all/stream/service/serverless.yml b/tests/integration-all/stream/service/serverless.yml index 9b43b4a2f..1d455cab1 100644 --- a/tests/integration-all/stream/service/serverless.yml +++ b/tests/integration-all/stream/service/serverless.yml @@ -2,7 +2,7 @@ service: CHANGE_TO_UNIQUE_PER_RUN provider: name: aws - runtime: nodejs10.x + runtime: nodejs12.x versionFunctions: false functions: diff --git a/tests/integration-all/websocket/service/serverless.yml b/tests/integration-all/websocket/service/serverless.yml index 596eb6826..7ed31074b 100644 --- a/tests/integration-all/websocket/service/serverless.yml +++ b/tests/integration-all/websocket/service/serverless.yml @@ -2,7 +2,7 @@ service: CHANGE_TO_UNIQUE_PER_RUN provider: name: aws - runtime: nodejs10.x + runtime: nodejs12.x versionFunctions: false logs: websocket: true diff --git a/tests/integration-package/cloudformation.tests.js b/tests/integration-package/cloudformation.tests.js index 0adc13fdc..66b443c53 100644 --- a/tests/integration-package/cloudformation.tests.js +++ b/tests/integration-package/cloudformation.tests.js @@ -44,7 +44,7 @@ describe('Integration test - Packaging', () => { Role: { 'Fn::GetAtt': ['IamRoleLambdaExecution', 'Arn'], }, - Runtime: 'nodejs10.x', + Runtime: 'nodejs12.x', Timeout: 6, }, DependsOn: ['HelloLogGroup', 'IamRoleLambdaExecution'], @@ -75,7 +75,7 @@ describe('Integration test - Packaging', () => { Role: { 'Fn::GetAtt': ['IamRoleLambdaExecution', 'Arn'], }, - Runtime: 'nodejs10.x', + Runtime: 'nodejs12.x', Timeout: 6, }, DependsOn: ['HelloLogGroup', 'IamRoleLambdaExecution'], @@ -109,7 +109,7 @@ describe('Integration test - Packaging', () => { Role: { 'Fn::GetAtt': ['IamRoleLambdaExecution', 'Arn'], }, - Runtime: 'nodejs10.x', + Runtime: 'nodejs12.x', Timeout: 6, }, DependsOn: ['HelloLogGroup', 'IamRoleLambdaExecution'], diff --git a/tests/integration-package/fixtures/artifact/serverless.yml b/tests/integration-package/fixtures/artifact/serverless.yml index e5668f229..0ac9fd5af 100644 --- a/tests/integration-package/fixtures/artifact/serverless.yml +++ b/tests/integration-package/fixtures/artifact/serverless.yml @@ -2,7 +2,7 @@ service: aws-nodejs provider: name: aws - runtime: nodejs10.x + runtime: nodejs12.x functions: hello: diff --git a/tests/integration-package/fixtures/individually-function/serverless.yml b/tests/integration-package/fixtures/individually-function/serverless.yml index d9994bbd5..a883a413c 100644 --- a/tests/integration-package/fixtures/individually-function/serverless.yml +++ b/tests/integration-package/fixtures/individually-function/serverless.yml @@ -2,7 +2,7 @@ service: aws-nodejs provider: name: aws - runtime: nodejs10.x + runtime: nodejs12.x functions: hello: diff --git a/tests/integration-package/fixtures/individually/serverless.yml b/tests/integration-package/fixtures/individually/serverless.yml index df2d79d23..b273f4882 100644 --- a/tests/integration-package/fixtures/individually/serverless.yml +++ b/tests/integration-package/fixtures/individually/serverless.yml @@ -2,7 +2,7 @@ service: aws-nodejs provider: name: aws - runtime: nodejs10.x + runtime: nodejs12.x package: individually: true diff --git a/tests/integration-package/fixtures/regular/serverless.yml b/tests/integration-package/fixtures/regular/serverless.yml index b9cffde35..9239c2b6b 100644 --- a/tests/integration-package/fixtures/regular/serverless.yml +++ b/tests/integration-package/fixtures/regular/serverless.yml @@ -2,7 +2,7 @@ service: aws-nodejs provider: name: aws - runtime: nodejs10.x + runtime: nodejs12.x functions: hello: