diff --git a/packages/@aws-cdk/assets-docker/lib/adopted-repository.ts b/packages/@aws-cdk/assets-docker/lib/adopted-repository.ts index 397afb6828b0e..6945b8b96c4bc 100644 --- a/packages/@aws-cdk/assets-docker/lib/adopted-repository.ts +++ b/packages/@aws-cdk/assets-docker/lib/adopted-repository.ts @@ -33,7 +33,7 @@ export class AdoptedRepository extends ecr.RepositoryBase { super(scope, id); const fn = new lambda.SingletonFunction(this, 'Function', { - runtime: lambda.Runtime.NodeJS810, + runtime: lambda.Runtime.Nodejs810, lambdaPurpose: 'AdoptEcrRepository', handler: 'handler.handler', code: lambda.Code.asset(path.join(__dirname, 'adopt-repository')), diff --git a/packages/@aws-cdk/aws-apigateway/test/integ.restapi.books.ts b/packages/@aws-cdk/aws-apigateway/test/integ.restapi.books.ts index 3a7b951c31e96..a4a43b3ded811 100644 --- a/packages/@aws-cdk/aws-apigateway/test/integ.restapi.books.ts +++ b/packages/@aws-cdk/aws-apigateway/test/integ.restapi.books.ts @@ -7,19 +7,19 @@ class BookStack extends cdk.Stack { super(scope, id); const booksHandler = new apigw.LambdaIntegration(new lambda.Function(this, 'BooksHandler', { - runtime: lambda.Runtime.NodeJS810, + runtime: lambda.Runtime.Nodejs810, handler: 'index.handler', code: lambda.Code.inline(`exports.handler = ${echoHandlerCode}`) })); const bookHandler = new apigw.LambdaIntegration(new lambda.Function(this, 'BookHandler', { - runtime: lambda.Runtime.NodeJS810, + runtime: lambda.Runtime.Nodejs810, handler: 'index.handler', code: lambda.Code.inline(`exports.handler = ${echoHandlerCode}`) })); const hello = new apigw.LambdaIntegration(new lambda.Function(this, 'Hello', { - runtime: lambda.Runtime.NodeJS810, + runtime: lambda.Runtime.Nodejs810, handler: 'index.handler', code: lambda.Code.inline(`exports.handler = ${helloCode}`) })); diff --git a/packages/@aws-cdk/aws-apigateway/test/integ.restapi.ts b/packages/@aws-cdk/aws-apigateway/test/integ.restapi.ts index 2e40a9c82add2..689374700d7fd 100644 --- a/packages/@aws-cdk/aws-apigateway/test/integ.restapi.ts +++ b/packages/@aws-cdk/aws-apigateway/test/integ.restapi.ts @@ -23,7 +23,7 @@ class Test extends cdk.Stack { }); const handler = new lambda.Function(this, 'MyHandler', { - runtime: lambda.Runtime.NodeJS810, + runtime: lambda.Runtime.Nodejs810, code: lambda.Code.inline(`exports.handler = ${handlerCode}`), handler: 'index.handler', }); diff --git a/packages/@aws-cdk/aws-apigateway/test/test.lambda-api.ts b/packages/@aws-cdk/aws-apigateway/test/test.lambda-api.ts index 48216e0a353cc..dfceb4b38c259 100644 --- a/packages/@aws-cdk/aws-apigateway/test/test.lambda-api.ts +++ b/packages/@aws-cdk/aws-apigateway/test/test.lambda-api.ts @@ -14,7 +14,7 @@ export = { const handler = new lambda.Function(stack, 'handler', { handler: 'index.handler', code: lambda.Code.inline('boom'), - runtime: lambda.Runtime.NodeJS810, + runtime: lambda.Runtime.Nodejs810, }); // WHEN @@ -78,7 +78,7 @@ export = { const handler = new lambda.Function(stack, 'handler', { handler: 'index.handler', code: lambda.Code.inline('boom'), - runtime: lambda.Runtime.NodeJS810, + runtime: lambda.Runtime.Nodejs810, }); const alias = new lambda.Alias(stack, 'alias', { aliasName: 'my-alias', @@ -145,7 +145,7 @@ export = { const handler = new lambda.Function(stack, 'handler', { handler: 'index.handler', code: lambda.Code.inline('boom'), - runtime: lambda.Runtime.NodeJS810, + runtime: lambda.Runtime.Nodejs810, }); // WHEN @@ -184,7 +184,7 @@ export = { const handler = new lambda.Function(stack, 'handler', { handler: 'index.handler', code: lambda.Code.inline('boom'), - runtime: lambda.Runtime.NodeJS810, + runtime: lambda.Runtime.Nodejs810, }); test.throws(() => new apigw.LambdaRestApi(stack, 'lambda-rest-api', { diff --git a/packages/@aws-cdk/aws-apigateway/test/test.lambda.ts b/packages/@aws-cdk/aws-apigateway/test/test.lambda.ts index 8a656c4542001..912b4c35ca59e 100644 --- a/packages/@aws-cdk/aws-apigateway/test/test.lambda.ts +++ b/packages/@aws-cdk/aws-apigateway/test/test.lambda.ts @@ -56,7 +56,7 @@ export = { // GIVEN const stack = new cdk.Stack(); const fn = new lambda.Function(stack, 'Handler', { - runtime: lambda.Runtime.NodeJS810, + runtime: lambda.Runtime.Nodejs810, code: lambda.Code.inline('foo'), handler: 'index.handler' }); @@ -106,7 +106,7 @@ export = { // GIVEN const stack = new cdk.Stack(); const fn = new lambda.Function(stack, 'Handler', { - runtime: lambda.Runtime.NodeJS810, + runtime: lambda.Runtime.Nodejs810, code: lambda.Code.inline('foo'), handler: 'index.handler' }); @@ -132,7 +132,7 @@ export = { const api = new apigateway.RestApi(stack, 'test-api'); const handler = new lambda.Function(stack, 'MyFunc', { - runtime: lambda.Runtime.NodeJS810, + runtime: lambda.Runtime.Nodejs810, handler: 'index.handler', code: lambda.Code.inline(``) }); diff --git a/packages/@aws-cdk/aws-autoscaling-hooktargets/test/hooks.test.ts b/packages/@aws-cdk/aws-autoscaling-hooktargets/test/hooks.test.ts index a8df07799f14d..90d47d423d184 100644 --- a/packages/@aws-cdk/aws-autoscaling-hooktargets/test/hooks.test.ts +++ b/packages/@aws-cdk/aws-autoscaling-hooktargets/test/hooks.test.ts @@ -57,7 +57,7 @@ describe('given an AutoScalingGroup', () => { // GIVEN const fn = new lambda.Function(stack, 'Fn', { code: lambda.Code.inline('foo'), - runtime: lambda.Runtime.NodeJS810, + runtime: lambda.Runtime.Nodejs810, handler: 'index.index', }); diff --git a/packages/@aws-cdk/aws-certificatemanager/lib/dns-validated-certificate.ts b/packages/@aws-cdk/aws-certificatemanager/lib/dns-validated-certificate.ts index e329df9ec4263..d5126f397dccb 100644 --- a/packages/@aws-cdk/aws-certificatemanager/lib/dns-validated-certificate.ts +++ b/packages/@aws-cdk/aws-certificatemanager/lib/dns-validated-certificate.ts @@ -50,7 +50,7 @@ export class DnsValidatedCertificate extends cdk.Resource implements ICertificat const requestorFunction = new lambda.Function(this, 'CertificateRequestorFunction', { code: lambda.Code.asset(path.resolve(__dirname, '..', 'lambda-packages', 'dns_validated_certificate_handler', 'lib')), handler: 'index.certificateRequestHandler', - runtime: lambda.Runtime.NodeJS810, + runtime: lambda.Runtime.Nodejs810, timeout: 15 * 60 // 15 minutes }); requestorFunction.addToRolePolicy( diff --git a/packages/@aws-cdk/aws-cloudformation/lib/aws-custom-resource.ts b/packages/@aws-cdk/aws-cloudformation/lib/aws-custom-resource.ts index 7243d6a1b1686..cf4d738db2fbf 100644 --- a/packages/@aws-cdk/aws-cloudformation/lib/aws-custom-resource.ts +++ b/packages/@aws-cdk/aws-cloudformation/lib/aws-custom-resource.ts @@ -123,7 +123,7 @@ export class AwsCustomResource extends cdk.Construct { const provider = new lambda.SingletonFunction(this, 'Provider', { code: lambda.Code.asset(path.join(__dirname, 'aws-custom-resource-provider')), - runtime: lambda.Runtime.NodeJS10x, + runtime: lambda.Runtime.Nodejs10x, handler: 'index.handler', uuid: '679f53fa-c002-430c-b0da-5b7982bd2287', lambdaPurpose: 'AWS' diff --git a/packages/@aws-cdk/aws-codedeploy/test/lambda/integ.deployment-group.ts b/packages/@aws-cdk/aws-codedeploy/test/lambda/integ.deployment-group.ts index 100da59cc5957..e5ba28c096c85 100644 --- a/packages/@aws-cdk/aws-codedeploy/test/lambda/integ.deployment-group.ts +++ b/packages/@aws-cdk/aws-codedeploy/test/lambda/integ.deployment-group.ts @@ -11,7 +11,7 @@ const stack = new cdk.Stack(app, 'aws-cdk-codedeploy-lambda'); const handler = new lambda.Function(stack, `Handler`, { code: lambda.Code.asset(path.join(__dirname, 'handler')), handler: 'index.handler', - runtime: lambda.Runtime.NodeJS810, + runtime: lambda.Runtime.Nodejs810, }); const version = handler.addVersion('1'); const blueGreenAlias = new lambda.Alias(stack, `Alias`, { @@ -22,12 +22,12 @@ const blueGreenAlias = new lambda.Alias(stack, `Alias`, { const preHook = new lambda.Function(stack, `PreHook`, { code: lambda.Code.asset(path.join(__dirname, 'preHook')), handler: 'index.handler', - runtime: lambda.Runtime.NodeJS810 + runtime: lambda.Runtime.Nodejs810 }); const postHook = new lambda.Function(stack, `PostHook`, { code: lambda.Code.asset(path.join(__dirname, 'postHook')), handler: 'index.handler', - runtime: lambda.Runtime.NodeJS810 + runtime: lambda.Runtime.Nodejs810 }); new codedeploy.LambdaDeploymentGroup(stack, 'BlueGreenDeployment', { diff --git a/packages/@aws-cdk/aws-codedeploy/test/lambda/test.deployment-group.ts b/packages/@aws-cdk/aws-codedeploy/test/lambda/test.deployment-group.ts index ffe617c10d918..fb4a61c53ac73 100644 --- a/packages/@aws-cdk/aws-codedeploy/test/lambda/test.deployment-group.ts +++ b/packages/@aws-cdk/aws-codedeploy/test/lambda/test.deployment-group.ts @@ -11,7 +11,7 @@ function mockFunction(stack: cdk.Stack, id: string) { return new lambda.Function(stack, id, { code: lambda.Code.inline('mock'), handler: 'index.handler', - runtime: lambda.Runtime.NodeJS810 + runtime: lambda.Runtime.Nodejs810 }); } function mockAlias(stack: cdk.Stack) { diff --git a/packages/@aws-cdk/aws-codepipeline-actions/README.md b/packages/@aws-cdk/aws-codepipeline-actions/README.md index 9763e297ad249..c671db8b4bfa3 100644 --- a/packages/@aws-cdk/aws-codepipeline-actions/README.md +++ b/packages/@aws-cdk/aws-codepipeline-actions/README.md @@ -396,7 +396,7 @@ const lambdaCode = lambda.Code.cfnParameters(); const func = new lambda.Function(lambdaStack, 'Lambda', { code: lambdaCode, handler: 'index.handler', - runtime: lambda.Runtime.NodeJS810, + runtime: lambda.Runtime.Nodejs810, }); // used to make sure each CDK synthesis produces a different Version const version = func.newVersion(); diff --git a/packages/@aws-cdk/aws-codepipeline-actions/test/integ.lambda-deployed-through-codepipeline.lit.ts b/packages/@aws-cdk/aws-codepipeline-actions/test/integ.lambda-deployed-through-codepipeline.lit.ts index 88b1ba9db4698..582eb90d002b6 100644 --- a/packages/@aws-cdk/aws-codepipeline-actions/test/integ.lambda-deployed-through-codepipeline.lit.ts +++ b/packages/@aws-cdk/aws-codepipeline-actions/test/integ.lambda-deployed-through-codepipeline.lit.ts @@ -14,7 +14,7 @@ const lambdaCode = lambda.Code.cfnParameters(); new lambda.Function(lambdaStack, 'Lambda', { code: lambdaCode, handler: 'index.handler', - runtime: lambda.Runtime.NodeJS810, + runtime: lambda.Runtime.Nodejs810, }); // other resources that your Lambda needs, added to the lambdaStack... diff --git a/packages/@aws-cdk/aws-codepipeline-actions/test/integ.lambda-pipeline.ts b/packages/@aws-cdk/aws-codepipeline-actions/test/integ.lambda-pipeline.ts index d4b12653a69b2..d31e0d1fd0695 100644 --- a/packages/@aws-cdk/aws-codepipeline-actions/test/integ.lambda-pipeline.ts +++ b/packages/@aws-cdk/aws-codepipeline-actions/test/integ.lambda-pipeline.ts @@ -34,7 +34,7 @@ const lambdaFun = new lambda.Function(stack, 'LambdaFun', { }; `), handler: 'index.handler', - runtime: lambda.Runtime.NodeJS810, + runtime: lambda.Runtime.Nodejs810, }); const lambdaStage = pipeline.addStage({ name: 'Lambda' }); lambdaStage.addAction(new cpactions.LambdaInvokeAction({ diff --git a/packages/@aws-cdk/aws-codepipeline-actions/test/lambda/test.lambda-invoke-action.ts b/packages/@aws-cdk/aws-codepipeline-actions/test/lambda/test.lambda-invoke-action.ts index bf070ad979170..c6a63c9be5a51 100644 --- a/packages/@aws-cdk/aws-codepipeline-actions/test/lambda/test.lambda-invoke-action.ts +++ b/packages/@aws-cdk/aws-codepipeline-actions/test/lambda/test.lambda-invoke-action.ts @@ -116,7 +116,7 @@ function stackIncludingLambdaInvokeCodePipeline(userParams: { [key: string]: any lambda: new lambda.Function(stack, 'Lambda', { code: lambda.Code.cfnParameters(), handler: 'index.handler', - runtime: lambda.Runtime.NodeJS810, + runtime: lambda.Runtime.Nodejs810, }), userParameters: userParams, }), diff --git a/packages/@aws-cdk/aws-codepipeline-actions/test/test.pipeline.ts b/packages/@aws-cdk/aws-codepipeline-actions/test/test.pipeline.ts index e75cb83e80a50..973bbd819dfd2 100644 --- a/packages/@aws-cdk/aws-codepipeline-actions/test/test.pipeline.ts +++ b/packages/@aws-cdk/aws-codepipeline-actions/test/test.pipeline.ts @@ -434,7 +434,7 @@ export = { const lambdaFun = new lambda.Function(stack, 'Function', { code: new lambda.InlineCode('bla'), handler: 'index.handler', - runtime: lambda.Runtime.NodeJS810, + runtime: lambda.Runtime.Nodejs810, }); const pipeline = new codepipeline.Pipeline(stack, 'Pipeline'); diff --git a/packages/@aws-cdk/aws-cognito/test/test.user-pool.ts b/packages/@aws-cdk/aws-cognito/test/test.user-pool.ts index 598de74f06467..d91c9543e133b 100644 --- a/packages/@aws-cdk/aws-cognito/test/test.user-pool.ts +++ b/packages/@aws-cdk/aws-cognito/test/test.user-pool.ts @@ -28,7 +28,7 @@ export = { const fn = new lambda.Function(stack, 'MyLambda', { code: new lambda.InlineCode('foo'), handler: 'index.handler', - runtime: lambda.Runtime.NodeJS810, + runtime: lambda.Runtime.Nodejs810, }); // WHEN @@ -56,7 +56,7 @@ export = { const fn = new lambda.Function(stack, 'MyLambda', { code: new lambda.InlineCode('foo'), handler: 'index.handler', - runtime: lambda.Runtime.NodeJS810, + runtime: lambda.Runtime.Nodejs810, }); // WHEN @@ -93,7 +93,7 @@ export = { const fn = new lambda.Function(stack, 'MyLambda', { code: new lambda.InlineCode('foo'), handler: 'index.handler', - runtime: lambda.Runtime.NodeJS810, + runtime: lambda.Runtime.Nodejs810, }); // WHEN diff --git a/packages/@aws-cdk/aws-config/test/integ.rule.lit.ts b/packages/@aws-cdk/aws-config/test/integ.rule.lit.ts index 59117767f4ea8..6077487022d3b 100644 --- a/packages/@aws-cdk/aws-config/test/integ.rule.lit.ts +++ b/packages/@aws-cdk/aws-config/test/integ.rule.lit.ts @@ -15,7 +15,7 @@ class ConfigStack extends cdk.Stack { const fn = new lambda.Function(this, 'CustomFunction', { code: lambda.AssetCode.inline('exports.handler = (event) => console.log(event);'), handler: 'index.handler', - runtime: lambda.Runtime.NodeJS810 + runtime: lambda.Runtime.Nodejs810 }); const customRule = new config.CustomRule(this, 'Custom', { diff --git a/packages/@aws-cdk/aws-config/test/test.rule.ts b/packages/@aws-cdk/aws-config/test/test.rule.ts index 464a6960414b6..6434e6b899f49 100644 --- a/packages/@aws-cdk/aws-config/test/test.rule.ts +++ b/packages/@aws-cdk/aws-config/test/test.rule.ts @@ -44,7 +44,7 @@ export = { const fn = new lambda.Function(stack, 'Function', { code: lambda.AssetCode.inline('foo'), handler: 'index.handler', - runtime: lambda.Runtime.NodeJS810 + runtime: lambda.Runtime.Nodejs810 }); // WHEN @@ -210,7 +210,7 @@ export = { const fn = new lambda.Function(stack, 'Function', { code: lambda.AssetCode.inline('foo'), handler: 'index.handler', - runtime: lambda.Runtime.NodeJS810 + runtime: lambda.Runtime.Nodejs810 }); // WHEN @@ -231,7 +231,7 @@ export = { const fn = new lambda.Function(stack, 'Function', { code: lambda.AssetCode.inline('foo'), handler: 'index.handler', - runtime: lambda.Runtime.NodeJS810 + runtime: lambda.Runtime.Nodejs810 }); // THEN @@ -252,7 +252,7 @@ export = { const fn = new lambda.Function(stack, 'Function', { code: lambda.Code.inline('dummy'), handler: 'index.handler', - runtime: lambda.Runtime.NodeJS810 + runtime: lambda.Runtime.Nodejs810 }); // WHEN diff --git a/packages/@aws-cdk/aws-dynamodb-global/lib/global-table-coordinator.ts b/packages/@aws-cdk/aws-dynamodb-global/lib/global-table-coordinator.ts index 5747247d6d1b9..ddfef88c00ae7 100644 --- a/packages/@aws-cdk/aws-dynamodb-global/lib/global-table-coordinator.ts +++ b/packages/@aws-cdk/aws-dynamodb-global/lib/global-table-coordinator.ts @@ -16,7 +16,7 @@ export class GlobalTableCoordinator extends cdk.Stack { code: lambda.Code.asset(path.resolve(__dirname, "../", "lambda-packages", "aws-global-table-coordinator", "lib")), description: "Lambda to make DynamoDB a global table", handler: "index.handler", - runtime: lambda.Runtime.NodeJS810, + runtime: lambda.Runtime.Nodejs810, timeout: 300, uuid: "D38B65A6-6B54-4FB6-9BAD-9CD40A6DAC12", }); diff --git a/packages/@aws-cdk/aws-events-targets/test/lambda/integ.events.ts b/packages/@aws-cdk/aws-events-targets/test/lambda/integ.events.ts index b733892b0e8e1..1cb1ba0c003ae 100644 --- a/packages/@aws-cdk/aws-events-targets/test/lambda/integ.events.ts +++ b/packages/@aws-cdk/aws-events-targets/test/lambda/integ.events.ts @@ -8,7 +8,7 @@ const app = new cdk.App(); const stack = new cdk.Stack(app, 'lambda-events'); const fn = new lambda.Function(stack, 'MyFunc', { - runtime: lambda.Runtime.NodeJS810, + runtime: lambda.Runtime.Nodejs810, handler: 'index.handler', code: lambda.Code.inline(`exports.handler = ${handler.toString()}`) }); diff --git a/packages/@aws-cdk/aws-lambda-event-sources/test/test-function.ts b/packages/@aws-cdk/aws-lambda-event-sources/test/test-function.ts index b3ba0c456cfcd..e48a6dd005527 100644 --- a/packages/@aws-cdk/aws-lambda-event-sources/test/test-function.ts +++ b/packages/@aws-cdk/aws-lambda-event-sources/test/test-function.ts @@ -6,7 +6,7 @@ export class TestFunction extends lambda.Function { super(scope, id, { handler: 'index.handler', code: lambda.Code.inline(`exports.handler = ${handler.toString()}`), - runtime: lambda.Runtime.NodeJS810 + runtime: lambda.Runtime.Nodejs810 }); } } diff --git a/packages/@aws-cdk/aws-lambda-event-sources/test/test.api.ts b/packages/@aws-cdk/aws-lambda-event-sources/test/test.api.ts index 44d00f76d9daa..a0681f36a765d 100644 --- a/packages/@aws-cdk/aws-lambda-event-sources/test/test.api.ts +++ b/packages/@aws-cdk/aws-lambda-event-sources/test/test.api.ts @@ -11,7 +11,7 @@ export = { const handler = new lambda.Function(stack, 'MyFunc', { code: lambda.Code.inline('boom'), handler: 'index.handler', - runtime: lambda.Runtime.NodeJS, + runtime: lambda.Runtime.Nodejs, }); // WHEN @@ -37,7 +37,7 @@ export = { const handler = new lambda.Function(stack, 'MyFunc', { code: lambda.Code.inline('boom'), handler: 'index.handler', - runtime: lambda.Runtime.NodeJS, + runtime: lambda.Runtime.Nodejs, }); // WHEN @@ -74,7 +74,7 @@ export = { const handler = new lambda.Function(stack, 'MyFunc', { code: lambda.Code.inline('boom'), handler: 'index.handler', - runtime: lambda.Runtime.NodeJS, + runtime: lambda.Runtime.Nodejs, }); // WHEN diff --git a/packages/@aws-cdk/aws-lambda/README.md b/packages/@aws-cdk/aws-lambda/README.md index 7a4ee26253432..008af92bd7719 100644 --- a/packages/@aws-cdk/aws-lambda/README.md +++ b/packages/@aws-cdk/aws-lambda/README.md @@ -18,7 +18,7 @@ This construct library allows you to define AWS Lambda Functions. import lambda = require('@aws-cdk/aws-lambda'); const fn = new lambda.Function(this, 'MyFunction', { - runtime: lambda.Runtime.NodeJS810, + runtime: lambda.Runtime.Nodejs810, handler: 'index.handler', code: lambda.Code.asset('./lambda-handler'), }); @@ -100,7 +100,7 @@ See the documentation for the __@aws-cdk/aws-lambda-event-sources__ module for m import lambda = require('@aws-cdk/aws-lambda'); const fn = new lambda.Function(this, 'MyFunction', { - runtime: lambda.Runtime.NodeJS810, + runtime: lambda.Runtime.Nodejs810, handler: 'index.handler', code: lambda.Code.inline('exports.handler = function(event, ctx, cb) { return cb(null, "hi"); }'), deadLetterQueueEnabled: true @@ -115,7 +115,7 @@ to learn more about AWS Lambdas and DLQs. import lambda = require('@aws-cdk/aws-lambda'); const fn = new lambda.Function(this, 'MyFunction', { - runtime: lambda.Runtime.NodeJS810, + runtime: lambda.Runtime.Nodejs810, handler: 'index.handler', code: lambda.Code.inline('exports.handler = function(event, ctx, cb) { return cb(null, "hi"); }'), tracing: lambda.Tracing.Active @@ -130,7 +130,7 @@ to learn more about AWS Lambda's X-Ray support. import lambda = require('@aws-cdk/aws-lambda'); const fn = new lambda.Function(this, 'MyFunction', { - runtime: lambda.Runtime.NodeJS810, + runtime: lambda.Runtime.Nodejs810, handler: 'index.handler', code: lambda.Code.inline('exports.handler = function(event, ctx, cb) { return cb(null, "hi"); }'), reservedConcurrentExecutions: 100 diff --git a/packages/@aws-cdk/aws-lambda/lib/log-retention.ts b/packages/@aws-cdk/aws-lambda/lib/log-retention.ts index 1196f04d38012..1796e13b09026 100644 --- a/packages/@aws-cdk/aws-lambda/lib/log-retention.ts +++ b/packages/@aws-cdk/aws-lambda/lib/log-retention.ts @@ -33,7 +33,7 @@ export class LogRetention extends cdk.Construct { // Custom resource provider const provider = new SingletonFunction(this, 'Provider', { code: Code.asset(path.join(__dirname, 'log-retention-provider')), - runtime: Runtime.NodeJS810, + runtime: Runtime.Nodejs810, handler: 'index.handler', uuid: 'aae0aa3c-5b4d-4f87-b02d-85b201efdd8a', lambdaPurpose: 'LogRetention', diff --git a/packages/@aws-cdk/aws-lambda/lib/runtime.ts b/packages/@aws-cdk/aws-lambda/lib/runtime.ts index 749857274803f..14c311d32595a 100644 --- a/packages/@aws-cdk/aws-lambda/lib/runtime.ts +++ b/packages/@aws-cdk/aws-lambda/lib/runtime.ts @@ -26,14 +26,14 @@ export class Runtime { /** A list of all known `Runtime`'s. */ public static readonly All = new Array(); - /** @deprecated Use `NodeJS810` or `NodeJS10x` */ - public static readonly NodeJS = new Runtime('nodejs', RuntimeFamily.NodeJS, { supportsInlineCode: true }); - /** @deprecated Use `NodeJS810` or `NodeJS10x` */ - public static readonly NodeJS43 = new Runtime('nodejs4.3', RuntimeFamily.NodeJS, { supportsInlineCode: true }); - /** @deprecated Use `NodeJS810` or `NodeJS10x` */ - public static readonly NodeJS610 = new Runtime('nodejs6.10', RuntimeFamily.NodeJS, { supportsInlineCode: true }); - public static readonly NodeJS810 = new Runtime('nodejs8.10', RuntimeFamily.NodeJS, { supportsInlineCode: true }); - public static readonly NodeJS10x = new Runtime('nodejs10.x', RuntimeFamily.NodeJS, { supportsInlineCode: false }); + /** @deprecated Use `Nodejs810` or `Nodejs10x` */ + public static readonly Nodejs = new Runtime('nodejs', RuntimeFamily.NodeJS, { supportsInlineCode: true }); + /** @deprecated Use `Nodejs810` or `Nodejs10x` */ + public static readonly Nodejs43 = new Runtime('nodejs4.3', RuntimeFamily.NodeJS, { supportsInlineCode: true }); + /** @deprecated Use `Nodejs810` or `Nodejs10x` */ + public static readonly Nodejs610 = new Runtime('nodejs6.10', RuntimeFamily.NodeJS, { supportsInlineCode: true }); + public static readonly Nodejs810 = new Runtime('nodejs8.10', RuntimeFamily.NodeJS, { supportsInlineCode: true }); + public static readonly Nodejs10x = new Runtime('nodejs10.x', RuntimeFamily.NodeJS, { supportsInlineCode: false }); public static readonly Python27 = new Runtime('python2.7', RuntimeFamily.Python, { supportsInlineCode: true }); public static readonly Python36 = new Runtime('python3.6', RuntimeFamily.Python, { supportsInlineCode: true }); public static readonly Python37 = new Runtime('python3.7', RuntimeFamily.Python, { supportsInlineCode: true }); diff --git a/packages/@aws-cdk/aws-lambda/test/integ.lambda.ts b/packages/@aws-cdk/aws-lambda/test/integ.lambda.ts index 4a0830b6ddaf8..c206e6c8177dc 100644 --- a/packages/@aws-cdk/aws-lambda/test/integ.lambda.ts +++ b/packages/@aws-cdk/aws-lambda/test/integ.lambda.ts @@ -9,7 +9,7 @@ const stack = new cdk.Stack(app, 'aws-cdk-lambda-1'); const fn = new lambda.Function(stack, 'MyLambda', { code: new lambda.InlineCode('foo'), handler: 'index.handler', - runtime: lambda.Runtime.NodeJS810, + runtime: lambda.Runtime.Nodejs810, }); fn.addToRolePolicy(new iam.PolicyStatement().addAllResources().addAction('*')); diff --git a/packages/@aws-cdk/aws-lambda/test/integ.layer-version.lit.ts b/packages/@aws-cdk/aws-lambda/test/integ.layer-version.lit.ts index b79c4957eafd9..612c7b0a95c07 100644 --- a/packages/@aws-cdk/aws-lambda/test/integ.layer-version.lit.ts +++ b/packages/@aws-cdk/aws-lambda/test/integ.layer-version.lit.ts @@ -12,7 +12,7 @@ const awsAccountId = stack.accountId; /// !show const layer = new lambda.LayerVersion(stack, 'MyLayer', { code: lambda.Code.directory(path.join(__dirname, 'layer-code')), - compatibleRuntimes: [lambda.Runtime.NodeJS810], + compatibleRuntimes: [lambda.Runtime.Nodejs810], license: 'Apache-2.0', description: 'A layer to test the L2 construct', }); @@ -26,7 +26,7 @@ layer.addPermission('remote-account-grant', { accountId: awsAccountId }); new lambda.Function(stack, 'MyLayeredLambda', { code: new lambda.InlineCode('foo'), handler: 'index.handler', - runtime: lambda.Runtime.NodeJS810, + runtime: lambda.Runtime.Nodejs810, layers: [layer], }); /// !hide diff --git a/packages/@aws-cdk/aws-lambda/test/integ.log-retention.ts b/packages/@aws-cdk/aws-lambda/test/integ.log-retention.ts index cc52b278fb857..9f2e60e68e79f 100644 --- a/packages/@aws-cdk/aws-lambda/test/integ.log-retention.ts +++ b/packages/@aws-cdk/aws-lambda/test/integ.log-retention.ts @@ -9,21 +9,21 @@ const stack = new cdk.Stack(app, 'aws-cdk-lambda-log-retention'); new lambda.Function(stack, 'OneWeek', { code: new lambda.InlineCode('exports.handler = (event) => console.log(JSON.stringify(event));'), handler: 'index.handler', - runtime: lambda.Runtime.NodeJS810, + runtime: lambda.Runtime.Nodejs810, logRetentionDays: logs.RetentionDays.OneWeek }); new lambda.Function(stack, 'OneMonth', { code: new lambda.InlineCode('exports.handler = (event) => console.log(JSON.stringify(event));'), handler: 'index.handler', - runtime: lambda.Runtime.NodeJS810, + runtime: lambda.Runtime.Nodejs810, logRetentionDays: logs.RetentionDays.OneMonth }); new lambda.Function(stack, 'OneYear', { code: new lambda.InlineCode('exports.handler = (event) => console.log(JSON.stringify(event));'), handler: 'index.handler', - runtime: lambda.Runtime.NodeJS810, + runtime: lambda.Runtime.Nodejs810, logRetentionDays: logs.RetentionDays.OneYear }); diff --git a/packages/@aws-cdk/aws-lambda/test/test.alias.ts b/packages/@aws-cdk/aws-lambda/test/test.alias.ts index f3208e37f0d39..0df0eca7c6689 100644 --- a/packages/@aws-cdk/aws-lambda/test/test.alias.ts +++ b/packages/@aws-cdk/aws-lambda/test/test.alias.ts @@ -10,7 +10,7 @@ export = { const fn = new lambda.Function(stack, 'MyLambda', { code: new lambda.InlineCode('hello()'), handler: 'index.hello', - runtime: lambda.Runtime.NodeJS810, + runtime: lambda.Runtime.Nodejs810, }); const version = fn.addVersion('1'); @@ -45,7 +45,7 @@ export = { const fn = new lambda.Function(stack, 'MyLambda', { code: new lambda.InlineCode('hello()'), handler: 'index.hello', - runtime: lambda.Runtime.NodeJS810, + runtime: lambda.Runtime.Nodejs810, }); const version = fn.newVersion(); @@ -73,7 +73,7 @@ export = { const fn = new lambda.Function(stack, 'MyLambda', { code: new lambda.InlineCode('hello()'), handler: 'index.hello', - runtime: lambda.Runtime.NodeJS810, + runtime: lambda.Runtime.Nodejs810, }); const version1 = fn.addVersion('1'); @@ -106,7 +106,7 @@ export = { const fn = new lambda.Function(stack, 'MyLambda', { code: new lambda.InlineCode('hello()'), handler: 'index.hello', - runtime: lambda.Runtime.NodeJS810, + runtime: lambda.Runtime.Nodejs810, }); const version = fn.addVersion('1'); @@ -137,7 +137,7 @@ export = { const fn = new lambda.Function(stack, 'MyLambda', { code: new lambda.InlineCode('hello()'), handler: 'index.hello', - runtime: lambda.Runtime.NodeJS810, + runtime: lambda.Runtime.Nodejs810, }); const version = fn.addVersion('1'); @@ -187,7 +187,7 @@ export = { const fn = new lambda.Function(stack, 'MyLambda', { code: new lambda.InlineCode('hello()'), handler: 'index.hello', - runtime: lambda.Runtime.NodeJS810, + runtime: lambda.Runtime.Nodejs810, }); const version = fn.addVersion('1'); @@ -206,7 +206,7 @@ export = { const fn = new lambda.Function(stack, 'MyLambda', { code: new lambda.InlineCode('hello()'), handler: 'index.hello', - runtime: lambda.Runtime.NodeJS810, + runtime: lambda.Runtime.Nodejs810, }); const version = fn.addVersion('1'); diff --git a/packages/@aws-cdk/aws-lambda/test/test.code.ts b/packages/@aws-cdk/aws-lambda/test/test.code.ts index 0b5e76ba239ac..d60ebd6c1abf2 100644 --- a/packages/@aws-cdk/aws-lambda/test/test.code.ts +++ b/packages/@aws-cdk/aws-lambda/test/test.code.ts @@ -17,7 +17,7 @@ export = { }, 'fails if larger than 4096 bytes'(test: Test) { test.throws( - () => defineFunction(lambda.Code.inline(generateRandomString(4097)), lambda.Runtime.NodeJS810), + () => defineFunction(lambda.Code.inline(generateRandomString(4097)), lambda.Runtime.Nodejs810), /Lambda source is too large, must be <= 4096 but is 4097/); test.done(); } @@ -52,13 +52,13 @@ export = { // WHEN new lambda.Function(stack, 'Func1', { handler: 'foom', - runtime: lambda.Runtime.NodeJS810, + runtime: lambda.Runtime.Nodejs810, code: directoryAsset }); new lambda.Function(stack, 'Func2', { handler: 'foom', - runtime: lambda.Runtime.NodeJS810, + runtime: lambda.Runtime.Nodejs810, code: directoryAsset }); @@ -86,7 +86,7 @@ export = { // WHEN new lambda.Function(stack, 'Func1', { code: lambda.Code.asset(location), - runtime: lambda.Runtime.NodeJS810, + runtime: lambda.Runtime.Nodejs810, handler: 'foom', }); @@ -107,7 +107,7 @@ export = { const code = new lambda.CfnParametersCode(); new lambda.Function(stack, 'Function', { code, - runtime: lambda.Runtime.NodeJS810, + runtime: lambda.Runtime.Nodejs810, handler: 'index.handler', }); @@ -161,7 +161,7 @@ export = { new lambda.Function(stack, 'Function', { code, - runtime: lambda.Runtime.NodeJS810, + runtime: lambda.Runtime.Nodejs810, handler: 'index.handler', }); @@ -206,7 +206,7 @@ export = { }, }; -function defineFunction(code: lambda.Code, runtime: lambda.Runtime = lambda.Runtime.NodeJS810) { +function defineFunction(code: lambda.Code, runtime: lambda.Runtime = lambda.Runtime.Nodejs810) { const stack = new cdk.Stack(); return new lambda.Function(stack, 'Func', { handler: 'foom', diff --git a/packages/@aws-cdk/aws-lambda/test/test.function.ts b/packages/@aws-cdk/aws-lambda/test/test.function.ts index 7ede8b0fcf085..00ddeb8b08c70 100644 --- a/packages/@aws-cdk/aws-lambda/test/test.function.ts +++ b/packages/@aws-cdk/aws-lambda/test/test.function.ts @@ -18,7 +18,7 @@ export = testCase({ }); const layer = new lambda.LayerVersion(stack, 'myLayer', { code, - compatibleRuntimes: [lambda.Runtime.NodeJS] + compatibleRuntimes: [lambda.Runtime.Nodejs] }); // THEN diff --git a/packages/@aws-cdk/aws-lambda/test/test.lambda.ts b/packages/@aws-cdk/aws-lambda/test/test.lambda.ts index f491ff4eb101c..b28d7e4b2bcd9 100644 --- a/packages/@aws-cdk/aws-lambda/test/test.lambda.ts +++ b/packages/@aws-cdk/aws-lambda/test/test.lambda.ts @@ -16,7 +16,7 @@ export = { new lambda.Function(stack, 'MyLambda', { code: new lambda.InlineCode('foo'), handler: 'index.handler', - runtime: lambda.Runtime.NodeJS810, + runtime: lambda.Runtime.Nodejs810, }); expect(stack).toMatch({ Resources: @@ -50,7 +50,7 @@ export = { new lambda.Function(stack, 'MyLambda', { code: new lambda.InlineCode('foo'), handler: 'index.handler', - runtime: lambda.Runtime.NodeJS810, + runtime: lambda.Runtime.Nodejs810, initialPolicy: [new iam.PolicyStatement().addAction("*").addAllResources()] }); expect(stack).toMatch({ Resources: @@ -293,7 +293,7 @@ export = { new lambda.Function(stack, 'MyLambda', { code: new lambda.InlineCode('foo'), handler: 'index.handler', - runtime: lambda.Runtime.NodeJS810, + runtime: lambda.Runtime.Nodejs810, functionName: 'OneFunctionToRuleThemAll', deadLetterQueueEnabled: true }); @@ -405,7 +405,7 @@ export = { new lambda.Function(stack, 'MyLambda', { code: new lambda.InlineCode('foo'), handler: 'index.handler', - runtime: lambda.Runtime.NodeJS810, + runtime: lambda.Runtime.Nodejs810, deadLetterQueueEnabled: true, }); @@ -515,7 +515,7 @@ export = { new lambda.Function(stack, 'MyLambda', { code: new lambda.InlineCode('foo'), handler: 'index.handler', - runtime: lambda.Runtime.NodeJS810, + runtime: lambda.Runtime.Nodejs810, deadLetterQueueEnabled: false, }); @@ -589,7 +589,7 @@ export = { new lambda.Function(stack, 'MyLambda', { code: new lambda.InlineCode('foo'), handler: 'index.handler', - runtime: lambda.Runtime.NodeJS810, + runtime: lambda.Runtime.Nodejs810, deadLetterQueue: dlQueue, }); @@ -698,7 +698,7 @@ export = { new lambda.Function(stack, 'MyLambda', { code: new lambda.InlineCode('foo'), handler: 'index.handler', - runtime: lambda.Runtime.NodeJS810, + runtime: lambda.Runtime.Nodejs810, deadLetterQueueEnabled: true, deadLetterQueue: dlQueue, }); @@ -808,7 +808,7 @@ export = { test.throws(() => new lambda.Function(stack, 'MyLambda', { code: new lambda.InlineCode('foo'), handler: 'index.handler', - runtime: lambda.Runtime.NodeJS810, + runtime: lambda.Runtime.Nodejs810, deadLetterQueueEnabled: false, deadLetterQueue: dlQueue, }), /deadLetterQueue defined but deadLetterQueueEnabled explicitly set to false/); @@ -822,7 +822,7 @@ export = { new lambda.Function(stack, 'MyLambda', { code: new lambda.InlineCode('foo'), handler: 'index.handler', - runtime: lambda.Runtime.NodeJS810, + runtime: lambda.Runtime.Nodejs810, tracing: lambda.Tracing.Active }); @@ -880,7 +880,7 @@ export = { new lambda.Function(stack, 'MyLambda', { code: new lambda.InlineCode('foo'), handler: 'index.handler', - runtime: lambda.Runtime.NodeJS810, + runtime: lambda.Runtime.Nodejs810, tracing: lambda.Tracing.PassThrough }); @@ -938,7 +938,7 @@ export = { new lambda.Function(stack, 'MyLambda', { code: new lambda.InlineCode('foo'), handler: 'index.handler', - runtime: lambda.Runtime.NodeJS810, + runtime: lambda.Runtime.Nodejs810, tracing: lambda.Tracing.Disabled }); @@ -995,7 +995,7 @@ export = { const fn = new lambda.Function(stack, 'Function', { code: lambda.Code.inline('xxx'), handler: 'index.handler', - runtime: lambda.Runtime.NodeJS810, + runtime: lambda.Runtime.Nodejs810, }); // WHEN @@ -1024,7 +1024,7 @@ export = { const fn = new lambda.Function(stack, 'Function', { code: lambda.Code.inline('xxx'), handler: 'index.handler', - runtime: lambda.Runtime.NodeJS810, + runtime: lambda.Runtime.Nodejs810, }); const service = new iam.ServicePrincipal('apigateway.amazonaws.com'); @@ -1052,7 +1052,7 @@ export = { const fn = new lambda.Function(stack, 'Function', { code: lambda.Code.inline('xxx'), handler: 'index.handler', - runtime: lambda.Runtime.NodeJS810, + runtime: lambda.Runtime.Nodejs810, }); const account = new iam.AccountPrincipal('123456789012'); @@ -1080,7 +1080,7 @@ export = { const fn = new lambda.Function(stack, 'Function', { code: lambda.Code.inline('xxx'), handler: 'index.handler', - runtime: lambda.Runtime.NodeJS810, + runtime: lambda.Runtime.Nodejs810, }); // THEN @@ -1101,7 +1101,7 @@ export = { const fn = new lambda.Function(stack, 'Function', { code: lambda.Code.inline('xxx'), handler: 'index.handler', - runtime: lambda.Runtime.NodeJS810, + runtime: lambda.Runtime.Nodejs810, }); let bindTarget; @@ -1159,13 +1159,13 @@ export = { const stack = new cdk.Stack(undefined, 'TestStack'); const layer = lambda.LayerVersion.fromLayerVersionAttributes(stack, 'TestLayer', { layerVersionArn: 'arn:aws:...', - compatibleRuntimes: [lambda.Runtime.NodeJS810], + compatibleRuntimes: [lambda.Runtime.Nodejs810], }); // THEN test.throws(() => new lambda.Function(stack, 'Function', { layers: [layer], - runtime: lambda.Runtime.NodeJS610, + runtime: lambda.Runtime.Nodejs610, code: lambda.Code.inline('exports.main = function() { console.log("DONE"); }'), handler: 'index.main' }), @@ -1179,13 +1179,13 @@ export = { const stack = new cdk.Stack(undefined, 'TestStack'); const layers = new Array(6).fill(lambda.LayerVersion.fromLayerVersionAttributes(stack, 'TestLayer', { layerVersionArn: 'arn:aws:...', - compatibleRuntimes: [lambda.Runtime.NodeJS810], + compatibleRuntimes: [lambda.Runtime.Nodejs810], })); // THEN test.throws(() => new lambda.Function(stack, 'Function', { layers, - runtime: lambda.Runtime.NodeJS810, + runtime: lambda.Runtime.Nodejs810, code: lambda.Code.inline('exports.main = function() { console.log("DONE"); }'), handler: 'index.main' }), @@ -1203,7 +1203,7 @@ export = { new lambda.Function(stack, 'MyLambda', { code: new lambda.InlineCode('foo'), handler: 'index.handler', - runtime: lambda.Runtime.NodeJS, + runtime: lambda.Runtime.Nodejs, environment: { SOME: 'Variable' } @@ -1221,7 +1221,7 @@ export = { new lambda.Function(stack, 'MyLambda', { code: new lambda.InlineCode('foo'), handler: 'index.handler', - runtime: lambda.Runtime.NodeJS, + runtime: lambda.Runtime.Nodejs, environment: { SOME: 'Variable' } @@ -1246,7 +1246,7 @@ export = { new lambda.Function(stack, 'MyLambda', { code: new lambda.InlineCode('foo'), handler: 'index.handler', - runtime: lambda.Runtime.NodeJS, + runtime: lambda.Runtime.Nodejs, reservedConcurrentExecutions: 10 }); @@ -1292,7 +1292,7 @@ export = { // WHEN new lambda.Function(stack, 'fn', { code: lambda.Code.inline('boom'), - runtime: lambda.Runtime.NodeJS810, + runtime: lambda.Runtime.Nodejs810, handler: 'index.bam', events: [ new EventSource(), @@ -1322,7 +1322,7 @@ export = { new lambda.Function(stack, 'MyLambda', { code: new lambda.InlineCode('foo'), handler: 'index.handler', - runtime: lambda.Runtime.NodeJS, + runtime: lambda.Runtime.Nodejs, logRetentionDays: logs.RetentionDays.OneMonth }); diff --git a/packages/@aws-cdk/aws-lambda/test/test.layers.ts b/packages/@aws-cdk/aws-lambda/test/test.layers.ts index 31b0cdf258c6d..7384de250326c 100644 --- a/packages/@aws-cdk/aws-lambda/test/test.layers.ts +++ b/packages/@aws-cdk/aws-lambda/test/test.layers.ts @@ -14,7 +14,7 @@ export = testCase({ // WHEN new lambda.LayerVersion(stack, 'LayerVersion', { code, - compatibleRuntimes: [lambda.Runtime.NodeJS810] + compatibleRuntimes: [lambda.Runtime.Nodejs810] }); // THEN @@ -36,7 +36,7 @@ export = testCase({ const code = new lambda.S3Code(bucket, 'ObjectKey'); const layer = new lambda.LayerVersion(stack, 'LayerVersion', { code, - compatibleRuntimes: [lambda.Runtime.NodeJS810] + compatibleRuntimes: [lambda.Runtime.Nodejs810] }); // WHEN diff --git a/packages/@aws-cdk/aws-lambda/test/test.vpc-lambda.ts b/packages/@aws-cdk/aws-lambda/test/test.vpc-lambda.ts index 9a4d94f959694..f53312d02ab54 100644 --- a/packages/@aws-cdk/aws-lambda/test/test.vpc-lambda.ts +++ b/packages/@aws-cdk/aws-lambda/test/test.vpc-lambda.ts @@ -21,7 +21,7 @@ export = { this.lambda = new lambda.Function(this.stack, 'Lambda', { code: new lambda.InlineCode('foo'), handler: 'index.handler', - runtime: lambda.Runtime.NodeJS810, + runtime: lambda.Runtime.Nodejs810, vpc: this.vpc, allowAllOutbound: false }); @@ -129,7 +129,7 @@ export = { const lambdaFn = new lambda.Function(stack, 'Lambda', { code: new lambda.InlineCode('foo'), handler: 'index.handler', - runtime: lambda.Runtime.NodeJS810, + runtime: lambda.Runtime.Nodejs810, }); // WHEN @@ -150,7 +150,7 @@ export = { new lambda.Function(stack, 'Lambda', { code: new lambda.InlineCode('foo'), handler: 'index.handler', - runtime: lambda.Runtime.NodeJS810, + runtime: lambda.Runtime.Nodejs810, vpc, vpcSubnets: { subnetType: ec2.SubnetType.Public } }); diff --git a/packages/@aws-cdk/aws-logs-destinations/test/lambda.test.ts b/packages/@aws-cdk/aws-logs-destinations/test/lambda.test.ts index a5766953cef54..6b6025f3045f3 100644 --- a/packages/@aws-cdk/aws-logs-destinations/test/lambda.test.ts +++ b/packages/@aws-cdk/aws-logs-destinations/test/lambda.test.ts @@ -10,7 +10,7 @@ test('lambda can be used as metric subscription destination', () => { const fn = new lambda.Function(stack, 'MyLambda', { code: new lambda.InlineCode('foo'), handler: 'index.handler', - runtime: lambda.Runtime.NodeJS810, + runtime: lambda.Runtime.Nodejs810, }); const logGroup = new logs.LogGroup(stack, 'LogGroup'); diff --git a/packages/@aws-cdk/aws-rds/test/integ.instance.lit.ts b/packages/@aws-cdk/aws-rds/test/integ.instance.lit.ts index 5229eb8cf3b41..463dbc41f0685 100644 --- a/packages/@aws-cdk/aws-rds/test/integ.instance.lit.ts +++ b/packages/@aws-cdk/aws-rds/test/integ.instance.lit.ts @@ -85,7 +85,7 @@ class DatabaseInstanceStack extends cdk.Stack { const fn = new lambda.Function(this, 'Function', { code: lambda.Code.inline('exports.handler = (event) => console.log(event);'), handler: 'index.handler', - runtime: lambda.Runtime.NodeJS810 + runtime: lambda.Runtime.Nodejs810 }); const availabilityRule = instance.onEvent('Availability', { target: new targets.LambdaFunction(fn) }); diff --git a/packages/@aws-cdk/aws-rds/test/test.instance.ts b/packages/@aws-cdk/aws-rds/test/test.instance.ts index 441fa691e6151..01e1a08b46610 100644 --- a/packages/@aws-cdk/aws-rds/test/test.instance.ts +++ b/packages/@aws-cdk/aws-rds/test/test.instance.ts @@ -310,7 +310,7 @@ export = { const fn = new lambda.Function(stack, 'Function', { code: lambda.Code.inline('dummy'), handler: 'index.handler', - runtime: lambda.Runtime.NodeJS810 + runtime: lambda.Runtime.Nodejs810 }); // WHEN diff --git a/packages/@aws-cdk/aws-s3-notifications/test/lambda/integ.bucket-notifications.ts b/packages/@aws-cdk/aws-s3-notifications/test/lambda/integ.bucket-notifications.ts index 0e06439a087be..90e8a1d8be2e5 100644 --- a/packages/@aws-cdk/aws-s3-notifications/test/lambda/integ.bucket-notifications.ts +++ b/packages/@aws-cdk/aws-s3-notifications/test/lambda/integ.bucket-notifications.ts @@ -12,7 +12,7 @@ const bucketA = new s3.Bucket(stack, 'MyBucket', { }); const fn = new lambda.Function(stack, 'MyFunction', { - runtime: lambda.Runtime.NodeJS810, + runtime: lambda.Runtime.Nodejs810, handler: 'index.handler', code: lambda.Code.inline(`exports.handler = ${handler.toString()}`) }); diff --git a/packages/@aws-cdk/aws-s3-notifications/test/lambda/lambda.test.ts b/packages/@aws-cdk/aws-s3-notifications/test/lambda/lambda.test.ts index 5b204c7abcacd..de568187c020a 100644 --- a/packages/@aws-cdk/aws-s3-notifications/test/lambda/lambda.test.ts +++ b/packages/@aws-cdk/aws-s3-notifications/test/lambda/lambda.test.ts @@ -10,7 +10,7 @@ test('lambda as notification target', () => { const stack = new Stack(); const bucketA = new s3.Bucket(stack, 'MyBucket'); const fn = new lambda.Function(stack, 'MyFunction', { - runtime: lambda.Runtime.NodeJS810, + runtime: lambda.Runtime.Nodejs810, handler: 'index.handler', code: lambda.Code.inline(`foo`) }); diff --git a/packages/@aws-cdk/aws-secretsmanager/test/test.rotation-schedule.ts b/packages/@aws-cdk/aws-secretsmanager/test/test.rotation-schedule.ts index c009d60e57722..2037c21c19bf9 100644 --- a/packages/@aws-cdk/aws-secretsmanager/test/test.rotation-schedule.ts +++ b/packages/@aws-cdk/aws-secretsmanager/test/test.rotation-schedule.ts @@ -10,7 +10,7 @@ export = { const stack = new cdk.Stack(); const secret = new secretsmanager.Secret(stack, 'Secret'); const rotationLambda = new lambda.Function(stack, 'Lambda', { - runtime: lambda.Runtime.NodeJS810, + runtime: lambda.Runtime.Nodejs810, code: lambda.Code.inline('export.handler = event => event;'), handler: 'index.handler' }); diff --git a/packages/@aws-cdk/aws-secretsmanager/test/test.secret.ts b/packages/@aws-cdk/aws-secretsmanager/test/test.secret.ts index ee22c2b55cbc9..c882f7e83d025 100644 --- a/packages/@aws-cdk/aws-secretsmanager/test/test.secret.ts +++ b/packages/@aws-cdk/aws-secretsmanager/test/test.secret.ts @@ -346,7 +346,7 @@ export = { }; const attachedSecret = secret.addTargetAttachment('AttachedSecret', { target }); const rotationLambda = new lambda.Function(stack, 'Lambda', { - runtime: lambda.Runtime.NodeJS810, + runtime: lambda.Runtime.Nodejs810, code: lambda.Code.inline('export.handler = event => event;'), handler: 'index.handler' }); diff --git a/packages/@aws-cdk/aws-ses/lib/receipt-rule.ts b/packages/@aws-cdk/aws-ses/lib/receipt-rule.ts index 7cff06f11a752..7bed450a1b691 100644 --- a/packages/@aws-cdk/aws-ses/lib/receipt-rule.ts +++ b/packages/@aws-cdk/aws-ses/lib/receipt-rule.ts @@ -170,7 +170,7 @@ export class DropSpamReceiptRule extends Construct { super(scope, id); const fn = new lambda.SingletonFunction(this, 'Function', { - runtime: lambda.Runtime.NodeJS810, + runtime: lambda.Runtime.Nodejs810, handler: 'index.handler', code: lambda.Code.inline(`exports.handler = ${dropSpamCode}`), uuid: '224e77f9-a32e-4b4d-ac32-983477abba16' diff --git a/packages/@aws-cdk/aws-ses/test/integ.receipt.ts b/packages/@aws-cdk/aws-ses/test/integ.receipt.ts index 0d58fe40de0ff..ea05d0a221cf0 100644 --- a/packages/@aws-cdk/aws-ses/test/integ.receipt.ts +++ b/packages/@aws-cdk/aws-ses/test/integ.receipt.ts @@ -14,7 +14,7 @@ const topic = new sns.Topic(stack, 'Topic'); const fn = new lambda.Function(stack, 'Function', { code: lambda.Code.inline('exports.handler = async (event) => event;'), handler: 'index.handler', - runtime: lambda.Runtime.NodeJS810 + runtime: lambda.Runtime.Nodejs810 }); const bucket = new s3.Bucket(stack, 'Bucket'); diff --git a/packages/@aws-cdk/aws-ses/test/test.receipt-rule-action.ts b/packages/@aws-cdk/aws-ses/test/test.receipt-rule-action.ts index fe3591bedc6de..258a1872b77e9 100644 --- a/packages/@aws-cdk/aws-ses/test/test.receipt-rule-action.ts +++ b/packages/@aws-cdk/aws-ses/test/test.receipt-rule-action.ts @@ -135,7 +135,7 @@ export = { const fn = new lambda.Function(stack, 'Function', { code: lambda.Code.inline(''), handler: 'index.handler', - runtime: lambda.Runtime.NodeJS810 + runtime: lambda.Runtime.Nodejs810 }); // WHEN diff --git a/packages/@aws-cdk/aws-sns-subscriptions/test/integ.sns-lambda.ts b/packages/@aws-cdk/aws-sns-subscriptions/test/integ.sns-lambda.ts index 53ecaf0fe6c17..4a6efc3f5699d 100644 --- a/packages/@aws-cdk/aws-sns-subscriptions/test/integ.sns-lambda.ts +++ b/packages/@aws-cdk/aws-sns-subscriptions/test/integ.sns-lambda.ts @@ -11,7 +11,7 @@ class SnsToSqs extends cdk.Stack { const fction = new lambda.Function(this, 'Echo', { handler: 'index.handler', - runtime: lambda.Runtime.NodeJS810, + runtime: lambda.Runtime.Nodejs810, code: lambda.Code.inline(`exports.handler = ${handler.toString()}`) }); diff --git a/packages/@aws-cdk/aws-sns-subscriptions/test/subs.test.ts b/packages/@aws-cdk/aws-sns-subscriptions/test/subs.test.ts index da1c73d17733e..fd9ae3f04c05e 100644 --- a/packages/@aws-cdk/aws-sns-subscriptions/test/subs.test.ts +++ b/packages/@aws-cdk/aws-sns-subscriptions/test/subs.test.ts @@ -164,7 +164,7 @@ test('queue subscription (with raw delivery)', () => { test('lambda subscription', () => { const fction = new lambda.Function(stack, 'MyFunc', { - runtime: lambda.Runtime.NodeJS810, + runtime: lambda.Runtime.Nodejs810, handler: 'index.handler', code: lambda.Code.inline('exports.handler = function(e, c, cb) { return cb() }') }); @@ -283,7 +283,7 @@ test('email subscription', () => { test('multiple subscriptions', () => { const queue = new sqs.Queue(stack, 'MyQueue'); const func = new lambda.Function(stack, 'MyFunc', { - runtime: lambda.Runtime.NodeJS810, + runtime: lambda.Runtime.Nodejs810, handler: 'index.handler', code: lambda.Code.inline('exports.handler = function(e, c, cb) { return cb() }') }); diff --git a/packages/decdk/examples/lambda-topic.json b/packages/decdk/examples/lambda-topic.json index 748379b81b40e..0111ca3520429 100644 --- a/packages/decdk/examples/lambda-topic.json +++ b/packages/decdk/examples/lambda-topic.json @@ -8,7 +8,7 @@ "Type": "@aws-cdk/aws-lambda.Function", "Properties": { "code": { "asset": { "path": "." } }, - "runtime": "NodeJS", + "runtime": "Nodejs", "handler": "index.handler", "events": [ { "@aws-cdk/aws-lambda-event-sources.SnsEventSource": { "topic": { "Ref": "Topic" } } }