java.lang.Object
software.amazon.jsii.JsiiObject
software.amazon.awscdk.services.lambda.Runtime
All Implemented Interfaces:
software.amazon.jsii.JsiiSerializable

@Generated(value="jsii-pacmak/1.84.0 (build 5404dcf)", date="2023-06-19T16:30:40.812Z") @Stability(Stable) public class Runtime extends software.amazon.jsii.JsiiObject
Lambda function runtime environment.

If you need to use a runtime name that doesn't exist as a static member, you can instantiate a Runtime object, e.g: new Runtime('nodejs99.99').

Example:

 import software.amazon.awscdk.services.signer.*;
 SigningProfile signingProfile = SigningProfile.Builder.create(this, "SigningProfile")
         .platform(Platform.AWS_LAMBDA_SHA384_ECDSA)
         .build();
 CodeSigningConfig codeSigningConfig = CodeSigningConfig.Builder.create(this, "CodeSigningConfig")
         .signingProfiles(List.of(signingProfile))
         .build();
 Function.Builder.create(this, "Function")
         .codeSigningConfig(codeSigningConfig)
         .runtime(Runtime.NODEJS_16_X)
         .handler("index.handler")
         .code(Code.fromAsset(join(__dirname, "lambda-handler")))
         .build();
 
  • Field Details

    • ALL

      @Stability(Stable) public static final List<Runtime> ALL
      A list of all known Runtime's.
    • DOTNET_6

      @Stability(Stable) public static final Runtime DOTNET_6
      The .NET 6 runtime (dotnet6).
    • DOTNET_CORE_1

      @Stability(Stable) public static final Runtime DOTNET_CORE_1
      The .NET Core 1.0 runtime (dotnetcore1.0) Legacy runtime no longer supported by AWS Lambda. Migrate to the latest .NET Core runtime.
    • DOTNET_CORE_2

      @Stability(Stable) public static final Runtime DOTNET_CORE_2
      The .NET Core 2.0 runtime (dotnetcore2.0) Legacy runtime no longer supported by AWS Lambda. Migrate to the latest .NET Core runtime.
    • DOTNET_CORE_2_1

      @Stability(Stable) public static final Runtime DOTNET_CORE_2_1
      The .NET Core 2.1 runtime (dotnetcore2.1) Legacy runtime no longer supported by AWS Lambda. Migrate to the latest .NET Core runtime.
    • DOTNET_CORE_3_1

      @Stability(Stable) public static final Runtime DOTNET_CORE_3_1
      The .NET Core 3.1 runtime (dotnetcore3.1).
    • FROM_IMAGE

      @Stability(Stable) public static final Runtime FROM_IMAGE
      A special runtime entry to be used when function is using a docker image.
    • GO_1_X

      @Stability(Stable) public static final Runtime GO_1_X
      The Go 1.x runtime (go1.x).
    • JAVA_11

      @Stability(Stable) public static final Runtime JAVA_11
      The Java 11 runtime (java11).
    • JAVA_8

      @Stability(Stable) public static final Runtime JAVA_8
      The Java 8 runtime (java8).
    • JAVA_8_CORRETTO

      @Stability(Stable) public static final Runtime JAVA_8_CORRETTO
      The Java 8 Corretto runtime (java8.al2).
    • NODEJS

      @Stability(Deprecated) @Deprecated public static final Runtime NODEJS
      Deprecated.
      Legacy runtime no longer supported by AWS Lambda. Migrate to the latest NodeJS runtime.
      (deprecated) The NodeJS runtime (nodejs).

    • NODEJS_10_X

      @Stability(Deprecated) @Deprecated public static final Runtime NODEJS_10_X
      Deprecated.
      Legacy runtime no longer supported by AWS Lambda. Migrate to the latest NodeJS runtime.
      (deprecated) The NodeJS 10.x runtime (nodejs10.x).

    • NODEJS_12_X

      @Stability(Stable) public static final Runtime NODEJS_12_X
      The NodeJS 12.x runtime (nodejs12.x).
    • NODEJS_14_X

      @Stability(Stable) public static final Runtime NODEJS_14_X
      The NodeJS 14.x runtime (nodejs14.x).
    • NODEJS_16_X

      @Stability(Stable) public static final Runtime NODEJS_16_X
      The NodeJS 16.x runtime (nodejs16.x).
    • NODEJS_4_3

      @Stability(Deprecated) @Deprecated public static final Runtime NODEJS_4_3
      Deprecated.
      Legacy runtime no longer supported by AWS Lambda. Migrate to the latest NodeJS runtime.
      (deprecated) The NodeJS 4.3 runtime (nodejs4.3).

    • NODEJS_6_10

      @Stability(Deprecated) @Deprecated public static final Runtime NODEJS_6_10
      Deprecated.
      Legacy runtime no longer supported by AWS Lambda. Migrate to the latest NodeJS runtime.
      (deprecated) The NodeJS 6.10 runtime (nodejs6.10).

    • NODEJS_8_10

      @Stability(Deprecated) @Deprecated public static final Runtime NODEJS_8_10
      Deprecated.
      Legacy runtime no longer supported by AWS Lambda. Migrate to the latest NodeJS runtime.
      (deprecated) The NodeJS 8.10 runtime (nodejs8.10).

    • PROVIDED

      @Stability(Stable) public static final Runtime PROVIDED
      The custom provided runtime (provided).
    • PROVIDED_AL2

      @Stability(Stable) public static final Runtime PROVIDED_AL2
      The custom provided runtime (provided).
    • PYTHON_2_7

      @Stability(Deprecated) @Deprecated public static final Runtime PYTHON_2_7
      Deprecated.
      Legacy runtime no longer supported by AWS Lambda. Migrate to the latest Python runtime.
      (deprecated) The Python 2.7 runtime (python2.7).

    • PYTHON_3_6

      @Stability(Deprecated) @Deprecated public static final Runtime PYTHON_3_6
      Deprecated.
      Legacy runtime no longer supported by AWS Lambda. Migrate to the latest Python runtime.
      (deprecated) The Python 3.6 runtime (python3.6) (not recommended).

      The Python 3.6 runtime is deprecated as of July 2022.

    • PYTHON_3_7

      @Stability(Stable) public static final Runtime PYTHON_3_7
      The Python 3.7 runtime (python3.7).
    • PYTHON_3_8

      @Stability(Stable) public static final Runtime PYTHON_3_8
      The Python 3.8 runtime (python3.8).
    • PYTHON_3_9

      @Stability(Stable) public static final Runtime PYTHON_3_9
      The Python 3.9 runtime (python3.9).
    • RUBY_2_5

      @Stability(Stable) public static final Runtime RUBY_2_5
      The Ruby 2.5 runtime (ruby2.5) Legacy runtime no longer supported by AWS Lambda. Migrate to the latest Ruby runtime.
    • RUBY_2_7

      @Stability(Stable) public static final Runtime RUBY_2_7
      The Ruby 2.7 runtime (ruby2.7).
  • Constructor Details

    • Runtime

      protected Runtime(software.amazon.jsii.JsiiObjectRef objRef)
    • Runtime

      protected Runtime(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
    • Runtime

      @Stability(Stable) public Runtime(@NotNull String name, @Nullable RuntimeFamily family, @Nullable LambdaRuntimeProps props)
      Parameters:
      name - This parameter is required.
      family -
      props -
    • Runtime

      @Stability(Stable) public Runtime(@NotNull String name, @Nullable RuntimeFamily family)
      Parameters:
      name - This parameter is required.
      family -
    • Runtime

      @Stability(Stable) public Runtime(@NotNull String name)
      Parameters:
      name - This parameter is required.
  • Method Details

    • runtimeEquals

      @Stability(Stable) @NotNull public Boolean runtimeEquals(@NotNull Runtime other)
      Parameters:
      other - This parameter is required.
    • toString

      @Stability(Stable) @NotNull public String toString()
      Overrides:
      toString in class Object
    • getBundlingDockerImage

      @Stability(Deprecated) @Deprecated @NotNull public BundlingDockerImage getBundlingDockerImage()
      Deprecated.
      use bundlingImage
      (deprecated) DEPRECATED.

    • getBundlingImage

      @Stability(Stable) @NotNull public DockerImage getBundlingImage()
      The bundling Docker image for this runtime.
    • getName

      @Stability(Stable) @NotNull public String getName()
      The name of this runtime, as expected by the Lambda resource.
    • getSupportsCodeGuruProfiling

      @Stability(Stable) @NotNull public Boolean getSupportsCodeGuruProfiling()
      Whether this runtime is integrated with and supported for profiling using Amazon CodeGuru Profiler.
    • getSupportsInlineCode

      @Stability(Stable) @NotNull public Boolean getSupportsInlineCode()
      Whether the ZipFile (aka inline code) property can be used with this runtime.
    • getFamily

      @Stability(Stable) @Nullable public RuntimeFamily getFamily()
      The runtime family.