Skip to content

Commit 20f4ec1

Browse files
robertdrix0rrr
authored andcommitted
fix(lambda): deprecate old Lambda runtimes (#2594)
Add deprecation warnings for lambda runtimes
1 parent 4d2fbe9 commit 20f4ec1

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

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

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,14 @@ export enum RuntimeFamily {
2323
* can instantiate a `Runtime` object, e.g: `new Runtime('nodejs99.99')`.
2424
*/
2525
export class Runtime {
26-
/** A list of all the know ``Runtime``s. */
26+
/** A list of all known `Runtime`'s. */
2727
public static readonly All = new Array<Runtime>();
2828

29+
/** @deprecated Use `NodeJS810` or `NodeJS10x` */
2930
public static readonly NodeJS = new Runtime('nodejs', RuntimeFamily.NodeJS, { supportsInlineCode: true });
31+
/** @deprecated Use `NodeJS810` or `NodeJS10x` */
3032
public static readonly NodeJS43 = new Runtime('nodejs4.3', RuntimeFamily.NodeJS, { supportsInlineCode: true });
33+
/** @deprecated Use `NodeJS810` or `NodeJS10x` */
3134
public static readonly NodeJS610 = new Runtime('nodejs6.10', RuntimeFamily.NodeJS, { supportsInlineCode: true });
3235
public static readonly NodeJS810 = new Runtime('nodejs8.10', RuntimeFamily.NodeJS, { supportsInlineCode: true });
3336
public static readonly NodeJS10x = new Runtime('nodejs10.x', RuntimeFamily.NodeJS, { supportsInlineCode: false });
@@ -36,6 +39,7 @@ export class Runtime {
3639
public static readonly Python37 = new Runtime('python3.7', RuntimeFamily.Python, { supportsInlineCode: true });
3740
public static readonly Java8 = new Runtime('java8', RuntimeFamily.Java);
3841
public static readonly DotNetCore1 = new Runtime('dotnetcore1.0', RuntimeFamily.DotNetCore);
42+
/** @deprecated Use `DotNetCore21` */
3943
public static readonly DotNetCore2 = new Runtime('dotnetcore2.0', RuntimeFamily.DotNetCore);
4044
public static readonly DotNetCore21 = new Runtime('dotnetcore2.1', RuntimeFamily.DotNetCore);
4145
public static readonly Go1x = new Runtime('go1.x', RuntimeFamily.Go);

0 commit comments

Comments
 (0)