Merge pull request #6983 from serverless/bump-runtime-in-docs

Default to Nodejs12.x runtime
This commit is contained in:
Mariusz Nowak 2019-11-20 12:18:10 +01:00 committed by GitHub
commit 0c8c8a0fb6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
41 changed files with 114 additions and 108 deletions

View File

@ -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:

View File

@ -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

View File

@ -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

View File

@ -3,7 +3,7 @@ service: hello-world # Service Name
provider:
name: aws
runtime: nodejs10.x
runtime: nodejs12.x
functions:
helloWorld:

View File

@ -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:

View File

@ -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
```

View File

@ -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

View File

@ -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

View File

@ -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.

View File

@ -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');
});
});

View File

@ -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}',

View File

@ -174,7 +174,7 @@ function addCustomResourceToService(awsProvider, resourceName, iamRoleStatements
FunctionName: absoluteFunctionName,
Handler,
MemorySize: 1024,
Runtime: 'nodejs10.x',
Runtime: 'nodejs12.x',
Timeout: 180,
},
DependsOn: [],

View File

@ -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: [],

View File

@ -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'
);
}

View File

@ -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',

View File

@ -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;

View File

@ -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:*:*'],
},

View File

@ -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',
},
};

View File

@ -10,7 +10,7 @@ plugins:
provider:
name: aws
runtime: nodejs10.x
runtime: nodejs12.x
custom:
alexa:

View File

@ -22,7 +22,7 @@ service: aws-clojurescript-gradle
provider:
name: aws
runtime: nodejs10.x
runtime: nodejs12.x
# you can overwrite defaults here
# stage: dev

View File

@ -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

View File

@ -10,7 +10,7 @@ plugins:
provider:
name: aws
runtime: nodejs10.x
runtime: nodejs12.x
functions:
first:

View File

@ -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:

View File

@ -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

View File

@ -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

View File

@ -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:

View File

@ -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

View File

@ -2,7 +2,7 @@ service: CHANGE_TO_UNIQUE_PER_RUN
provider:
name: aws
runtime: nodejs10.x
runtime: nodejs12.x
versionFunctions: false
functions:

View File

@ -2,7 +2,7 @@ service: CHANGE_TO_UNIQUE_PER_RUN
provider:
name: aws
runtime: nodejs10.x
runtime: nodejs12.x
versionFunctions: false
functions:

View File

@ -2,7 +2,7 @@ service: CHANGE_TO_UNIQUE_PER_RUN
provider:
name: aws
runtime: nodejs10.x
runtime: nodejs12.x
versionFunctions: false
functions:

View File

@ -2,7 +2,7 @@ service: CHANGE_TO_UNIQUE_PER_RUN
provider:
name: aws
runtime: nodejs10.x
runtime: nodejs12.x
versionFunctions: false
functions:

View File

@ -2,7 +2,7 @@ service: CHANGE_TO_UNIQUE_PER_RUN
provider:
name: aws
runtime: nodejs10.x
runtime: nodejs12.x
versionFunctions: false
functions:

View File

@ -2,7 +2,7 @@ service: CHANGE_TO_UNIQUE_PER_RUN
provider:
name: aws
runtime: nodejs10.x
runtime: nodejs12.x
versionFunctions: false
functions:

View File

@ -2,7 +2,7 @@ service: CHANGE_TO_UNIQUE_PER_RUN
provider:
name: aws
runtime: nodejs10.x
runtime: nodejs12.x
versionFunctions: false
functions:

View File

@ -2,7 +2,7 @@ service: CHANGE_TO_UNIQUE_PER_RUN
provider:
name: aws
runtime: nodejs10.x
runtime: nodejs12.x
versionFunctions: false
functions:

View File

@ -2,7 +2,7 @@ service: CHANGE_TO_UNIQUE_PER_RUN
provider:
name: aws
runtime: nodejs10.x
runtime: nodejs12.x
versionFunctions: false
logs:
websocket: true

View File

@ -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'],

View File

@ -2,7 +2,7 @@ service: aws-nodejs
provider:
name: aws
runtime: nodejs10.x
runtime: nodejs12.x
functions:
hello:

View File

@ -2,7 +2,7 @@ service: aws-nodejs
provider:
name: aws
runtime: nodejs10.x
runtime: nodejs12.x
functions:
hello:

View File

@ -2,7 +2,7 @@ service: aws-nodejs
provider:
name: aws
runtime: nodejs10.x
runtime: nodejs12.x
package:
individually: true

View File

@ -2,7 +2,7 @@ service: aws-nodejs
provider:
name: aws
runtime: nodejs10.x
runtime: nodejs12.x
functions:
hello: