diff --git a/packages/@aws-cdk/aws-lambda/lib/runtime.ts b/packages/@aws-cdk/aws-lambda/lib/runtime.ts index e5a4ab552996c..2de0a98e9bcaf 100644 --- a/packages/@aws-cdk/aws-lambda/lib/runtime.ts +++ b/packages/@aws-cdk/aws-lambda/lib/runtime.ts @@ -12,7 +12,8 @@ export enum RuntimeFamily { Python, DotNetCore, Go, - Ruby + Ruby, + Other } /** @@ -38,6 +39,7 @@ export class Runtime { public static readonly DotNetCore21 = new Runtime('dotnetcore2.1', RuntimeFamily.DotNetCore); public static readonly Go1x = new Runtime('go1.x', RuntimeFamily.Go); public static readonly Ruby25 = new Runtime('ruby2.5', RuntimeFamily.Ruby, { supportsInlineCode: true }); + public static readonly Provided = new Runtime('provided', RuntimeFamily.Other); /** * The name of this runtime, as expected by the Lambda resource. diff --git a/packages/@aws-cdk/aws-lambda/test/test.lambda.ts b/packages/@aws-cdk/aws-lambda/test/test.lambda.ts index c1df96c06148d..a64ca64d23e24 100644 --- a/packages/@aws-cdk/aws-lambda/test/test.lambda.ts +++ b/packages/@aws-cdk/aws-lambda/test/test.lambda.ts @@ -1286,6 +1286,15 @@ export = { // THEN test.deepEqual(bindCount, 2); + test.done(); + }, + + 'Provided Runtime returns the right values'(test: Test) { + const rt = lambda.Runtime.Provided; + + test.equal(rt.name, 'provided'); + test.equal(rt.supportsInlineCode, false); + test.done(); } };