Skip to content

Commit 553577a

Browse files
robertdrix0rrr
authored andcommittedMay 20, 2019
feat(lambda): add NodeJS10x runtime (#2544)
Add support for Node 10 runtime.
1 parent 68efa04 commit 553577a

26 files changed

+68
-67
lines changed
 

‎packages/@aws-cdk/aws-apigateway/test/integ.restapi.books.expected.json

+3-3
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@
5454
"Arn"
5555
]
5656
},
57-
"Runtime": "nodejs6.10"
57+
"Runtime": "nodejs8.10"
5858
},
5959
"DependsOn": [
6060
"BooksHandlerServiceRole5B6A8847"
@@ -270,7 +270,7 @@
270270
"Arn"
271271
]
272272
},
273-
"Runtime": "nodejs6.10"
273+
"Runtime": "nodejs8.10"
274274
},
275275
"DependsOn": [
276276
"BookHandlerServiceRole894768AD"
@@ -486,7 +486,7 @@
486486
"Arn"
487487
]
488488
},
489-
"Runtime": "nodejs6.10"
489+
"Runtime": "nodejs8.10"
490490
},
491491
"DependsOn": [
492492
"HelloServiceRole1E55EA16"

‎packages/@aws-cdk/aws-apigateway/test/integ.restapi.books.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -7,19 +7,19 @@ class BookStack extends cdk.Stack {
77
super(scope, id);
88

99
const booksHandler = new apigw.LambdaIntegration(new lambda.Function(this, 'BooksHandler', {
10-
runtime: lambda.Runtime.NodeJS610,
10+
runtime: lambda.Runtime.NodeJS810,
1111
handler: 'index.handler',
1212
code: lambda.Code.inline(`exports.handler = ${echoHandlerCode}`)
1313
}));
1414

1515
const bookHandler = new apigw.LambdaIntegration(new lambda.Function(this, 'BookHandler', {
16-
runtime: lambda.Runtime.NodeJS610,
16+
runtime: lambda.Runtime.NodeJS810,
1717
handler: 'index.handler',
1818
code: lambda.Code.inline(`exports.handler = ${echoHandlerCode}`)
1919
}));
2020

2121
const hello = new apigw.LambdaIntegration(new lambda.Function(this, 'Hello', {
22-
runtime: lambda.Runtime.NodeJS610,
22+
runtime: lambda.Runtime.NodeJS810,
2323
handler: 'index.handler',
2424
code: lambda.Code.inline(`exports.handler = ${helloCode}`)
2525
}));

‎packages/@aws-cdk/aws-apigateway/test/integ.restapi.expected.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -384,7 +384,7 @@
384384
"Arn"
385385
]
386386
},
387-
"Runtime": "nodejs6.10"
387+
"Runtime": "nodejs8.10"
388388
},
389389
"DependsOn": [
390390
"MyHandlerServiceRoleFFA06653"

‎packages/@aws-cdk/aws-apigateway/test/integ.restapi.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ class Test extends cdk.Stack {
2323
});
2424

2525
const handler = new lambda.Function(this, 'MyHandler', {
26-
runtime: lambda.Runtime.NodeJS610,
26+
runtime: lambda.Runtime.NodeJS810,
2727
code: lambda.Code.inline(`exports.handler = ${handlerCode}`),
2828
handler: 'index.handler',
2929
});

‎packages/@aws-cdk/aws-apigateway/test/test.lambda-api.ts

+4-4
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ export = {
1414
const handler = new lambda.Function(stack, 'handler', {
1515
handler: 'index.handler',
1616
code: lambda.Code.inline('boom'),
17-
runtime: lambda.Runtime.NodeJS610,
17+
runtime: lambda.Runtime.NodeJS810,
1818
});
1919

2020
// WHEN
@@ -78,7 +78,7 @@ export = {
7878
const handler = new lambda.Function(stack, 'handler', {
7979
handler: 'index.handler',
8080
code: lambda.Code.inline('boom'),
81-
runtime: lambda.Runtime.NodeJS610,
81+
runtime: lambda.Runtime.NodeJS810,
8282
});
8383
const alias = new lambda.Alias(stack, 'alias', {
8484
aliasName: 'my-alias',
@@ -145,7 +145,7 @@ export = {
145145
const handler = new lambda.Function(stack, 'handler', {
146146
handler: 'index.handler',
147147
code: lambda.Code.inline('boom'),
148-
runtime: lambda.Runtime.NodeJS610,
148+
runtime: lambda.Runtime.NodeJS810,
149149
});
150150

151151
// WHEN
@@ -184,7 +184,7 @@ export = {
184184
const handler = new lambda.Function(stack, 'handler', {
185185
handler: 'index.handler',
186186
code: lambda.Code.inline('boom'),
187-
runtime: lambda.Runtime.NodeJS610,
187+
runtime: lambda.Runtime.NodeJS810,
188188
});
189189

190190
test.throws(() => new apigw.LambdaRestApi(stack, 'lambda-rest-api', {

‎packages/@aws-cdk/aws-apigateway/test/test.lambda.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ export = {
5656
// GIVEN
5757
const stack = new cdk.Stack();
5858
const fn = new lambda.Function(stack, 'Handler', {
59-
runtime: lambda.Runtime.NodeJS610,
59+
runtime: lambda.Runtime.NodeJS810,
6060
code: lambda.Code.inline('foo'),
6161
handler: 'index.handler'
6262
});
@@ -106,7 +106,7 @@ export = {
106106
// GIVEN
107107
const stack = new cdk.Stack();
108108
const fn = new lambda.Function(stack, 'Handler', {
109-
runtime: lambda.Runtime.NodeJS610,
109+
runtime: lambda.Runtime.NodeJS810,
110110
code: lambda.Code.inline('foo'),
111111
handler: 'index.handler'
112112
});
@@ -132,7 +132,7 @@ export = {
132132
const api = new apigateway.RestApi(stack, 'test-api');
133133

134134
const handler = new lambda.Function(stack, 'MyFunc', {
135-
runtime: lambda.Runtime.NodeJS610,
135+
runtime: lambda.Runtime.NodeJS810,
136136
handler: 'index.handler',
137137
code: lambda.Code.inline(``)
138138
});

‎packages/@aws-cdk/aws-codepipeline-actions/test/integ.lambda-pipeline.expected.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -658,7 +658,7 @@
658658
"Arn"
659659
]
660660
},
661-
"Runtime": "nodejs6.10"
661+
"Runtime": "nodejs8.10"
662662
},
663663
"DependsOn": [
664664
"LambdaFunServiceRoleDefaultPolicy217FED83",

‎packages/@aws-cdk/aws-codepipeline-actions/test/integ.lambda-pipeline.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ const lambdaFun = new lambda.Function(stack, 'LambdaFun', {
3434
};
3535
`),
3636
handler: 'index.handler',
37-
runtime: lambda.Runtime.NodeJS610,
37+
runtime: lambda.Runtime.NodeJS810,
3838
});
3939
const lambdaStage = pipeline.addStage({ name: 'Lambda' });
4040
lambdaStage.addAction(new cpactions.LambdaInvokeAction({

‎packages/@aws-cdk/aws-codepipeline-actions/test/test.pipeline.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -434,7 +434,7 @@ export = {
434434
const lambdaFun = new lambda.Function(stack, 'Function', {
435435
code: new lambda.InlineCode('bla'),
436436
handler: 'index.handler',
437-
runtime: lambda.Runtime.NodeJS43,
437+
runtime: lambda.Runtime.NodeJS810,
438438
});
439439

440440
const pipeline = new codepipeline.Pipeline(stack, 'Pipeline');

‎packages/@aws-cdk/aws-cognito/test/test.user-pool.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ export = {
2828
const fn = new lambda.Function(stack, 'MyLambda', {
2929
code: new lambda.InlineCode('foo'),
3030
handler: 'index.handler',
31-
runtime: lambda.Runtime.NodeJS610,
31+
runtime: lambda.Runtime.NodeJS810,
3232
});
3333

3434
// WHEN
@@ -56,7 +56,7 @@ export = {
5656
const fn = new lambda.Function(stack, 'MyLambda', {
5757
code: new lambda.InlineCode('foo'),
5858
handler: 'index.handler',
59-
runtime: lambda.Runtime.NodeJS610,
59+
runtime: lambda.Runtime.NodeJS810,
6060
});
6161

6262
// WHEN
@@ -93,7 +93,7 @@ export = {
9393
const fn = new lambda.Function(stack, 'MyLambda', {
9494
code: new lambda.InlineCode('foo'),
9595
handler: 'index.handler',
96-
runtime: lambda.Runtime.NodeJS610,
96+
runtime: lambda.Runtime.NodeJS810,
9797
});
9898

9999
// WHEN

‎packages/@aws-cdk/aws-events-targets/test/lambda/integ.events.expected.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@
5454
"Arn"
5555
]
5656
},
57-
"Runtime": "nodejs6.10"
57+
"Runtime": "nodejs8.10"
5858
},
5959
"DependsOn": [
6060
"MyFuncServiceRole54065130"

‎packages/@aws-cdk/aws-events-targets/test/lambda/integ.events.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ const app = new cdk.App();
88
const stack = new cdk.Stack(app, 'lambda-events');
99

1010
const fn = new lambda.Function(stack, 'MyFunc', {
11-
runtime: lambda.Runtime.NodeJS610,
11+
runtime: lambda.Runtime.NodeJS810,
1212
handler: 'index.handler',
1313
code: lambda.Code.inline(`exports.handler = ${handler.toString()}`)
1414
});

‎packages/@aws-cdk/aws-lambda/lib/runtime.ts

+1
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ export class Runtime {
3030
public static readonly NodeJS43 = new Runtime('nodejs4.3', RuntimeFamily.NodeJS, { supportsInlineCode: true });
3131
public static readonly NodeJS610 = new Runtime('nodejs6.10', RuntimeFamily.NodeJS, { supportsInlineCode: true });
3232
public static readonly NodeJS810 = new Runtime('nodejs8.10', RuntimeFamily.NodeJS, { supportsInlineCode: true });
33+
public static readonly NodeJS10x = new Runtime('nodejs10.x', RuntimeFamily.NodeJS, { supportsInlineCode: false });
3334
public static readonly Python27 = new Runtime('python2.7', RuntimeFamily.Python, { supportsInlineCode: true });
3435
public static readonly Python36 = new Runtime('python3.6', RuntimeFamily.Python, { supportsInlineCode: true });
3536
public static readonly Python37 = new Runtime('python3.7', RuntimeFamily.Python, { supportsInlineCode: true });

‎packages/@aws-cdk/aws-lambda/test/integ.bucket-notifications.expected.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@
9999
"Arn"
100100
]
101101
},
102-
"Runtime": "nodejs6.10"
102+
"Runtime": "nodejs8.10"
103103
},
104104
"DependsOn": [
105105
"MyFunctionServiceRole3C357FF2"

‎packages/@aws-cdk/aws-lambda/test/integ.bucket-notifications.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ const bucketA = new s3.Bucket(stack, 'MyBucket', {
1111
});
1212

1313
const fn = new lambda.Function(stack, 'MyFunction', {
14-
runtime: lambda.Runtime.NodeJS610,
14+
runtime: lambda.Runtime.NodeJS810,
1515
handler: 'index.handler',
1616
code: lambda.Code.inline(`exports.handler = ${handler.toString()}`)
1717
});

‎packages/@aws-cdk/aws-lambda/test/integ.lambda.expected.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@
7575
"Arn"
7676
]
7777
},
78-
"Runtime": "nodejs6.10"
78+
"Runtime": "nodejs8.10"
7979
},
8080
"DependsOn": [
8181
"MyLambdaServiceRoleDefaultPolicy5BBC6F68",

‎packages/@aws-cdk/aws-lambda/test/integ.lambda.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ const stack = new cdk.Stack(app, 'aws-cdk-lambda-1');
99
const fn = new lambda.Function(stack, 'MyLambda', {
1010
code: new lambda.InlineCode('foo'),
1111
handler: 'index.handler',
12-
runtime: lambda.Runtime.NodeJS610,
12+
runtime: lambda.Runtime.NodeJS810,
1313
});
1414

1515
fn.addToRolePolicy(new iam.PolicyStatement().addAllResources().addAction('*'));

‎packages/@aws-cdk/aws-lambda/test/test.alias.ts

+7-7
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ export = {
1010
const fn = new lambda.Function(stack, 'MyLambda', {
1111
code: new lambda.InlineCode('hello()'),
1212
handler: 'index.hello',
13-
runtime: lambda.Runtime.NodeJS610,
13+
runtime: lambda.Runtime.NodeJS810,
1414
});
1515

1616
const version = fn.addVersion('1');
@@ -45,7 +45,7 @@ export = {
4545
const fn = new lambda.Function(stack, 'MyLambda', {
4646
code: new lambda.InlineCode('hello()'),
4747
handler: 'index.hello',
48-
runtime: lambda.Runtime.NodeJS610,
48+
runtime: lambda.Runtime.NodeJS810,
4949
});
5050

5151
const version = fn.newVersion();
@@ -73,7 +73,7 @@ export = {
7373
const fn = new lambda.Function(stack, 'MyLambda', {
7474
code: new lambda.InlineCode('hello()'),
7575
handler: 'index.hello',
76-
runtime: lambda.Runtime.NodeJS610,
76+
runtime: lambda.Runtime.NodeJS810,
7777
});
7878

7979
const version1 = fn.addVersion('1');
@@ -106,7 +106,7 @@ export = {
106106
const fn = new lambda.Function(stack, 'MyLambda', {
107107
code: new lambda.InlineCode('hello()'),
108108
handler: 'index.hello',
109-
runtime: lambda.Runtime.NodeJS610,
109+
runtime: lambda.Runtime.NodeJS810,
110110
});
111111

112112
const version = fn.addVersion('1');
@@ -137,7 +137,7 @@ export = {
137137
const fn = new lambda.Function(stack, 'MyLambda', {
138138
code: new lambda.InlineCode('hello()'),
139139
handler: 'index.hello',
140-
runtime: lambda.Runtime.NodeJS610,
140+
runtime: lambda.Runtime.NodeJS810,
141141
});
142142

143143
const version = fn.addVersion('1');
@@ -187,7 +187,7 @@ export = {
187187
const fn = new lambda.Function(stack, 'MyLambda', {
188188
code: new lambda.InlineCode('hello()'),
189189
handler: 'index.hello',
190-
runtime: lambda.Runtime.NodeJS610,
190+
runtime: lambda.Runtime.NodeJS810,
191191
});
192192

193193
const version = fn.addVersion('1');
@@ -206,7 +206,7 @@ export = {
206206
const fn = new lambda.Function(stack, 'MyLambda', {
207207
code: new lambda.InlineCode('hello()'),
208208
handler: 'index.hello',
209-
runtime: lambda.Runtime.NodeJS610,
209+
runtime: lambda.Runtime.NodeJS810,
210210
});
211211

212212
const version = fn.addVersion('1');

‎packages/@aws-cdk/aws-lambda/test/test.code.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ export = {
1717
},
1818
'fails if larger than 4096 bytes'(test: Test) {
1919
test.throws(
20-
() => defineFunction(lambda.Code.inline(generateRandomString(4097)), lambda.Runtime.NodeJS610),
20+
() => defineFunction(lambda.Code.inline(generateRandomString(4097)), lambda.Runtime.NodeJS810),
2121
/Lambda source is too large, must be <= 4096 but is 4097/);
2222
test.done();
2323
}

0 commit comments

Comments
 (0)