class Runtime
Language | Type name |
---|---|
.NET | Amazon.CDK.AWS.Lambda.Runtime |
Go | github.com/aws/aws-cdk-go/awscdk/v2/awslambda#Runtime |
Java | software.amazon.awscdk.services.lambda.Runtime |
Python | aws_cdk.aws_lambda.Runtime |
TypeScript (source) | aws-cdk-lib » aws_lambda » Runtime |
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 * as signer from 'aws-cdk-lib/aws-signer';
const signingProfile = new signer.SigningProfile(this, 'SigningProfile', {
platform: signer.Platform.AWS_LAMBDA_SHA384_ECDSA,
});
const codeSigningConfig = new lambda.CodeSigningConfig(this, 'CodeSigningConfig', {
signingProfiles: [signingProfile],
});
new lambda.Function(this, 'Function', {
codeSigningConfig,
runtime: lambda.Runtime.NODEJS_18_X,
handler: 'index.handler',
code: lambda.Code.fromAsset(path.join(__dirname, 'lambda-handler')),
});
Initializer
new Runtime(name: string, family?: RuntimeFamily, props?: LambdaRuntimeProps)
Parameters
- name
string
- family
Runtime
Family - props
Lambda
Runtime Props
Properties
Name | Type | Description |
---|---|---|
bundling | Docker | The bundling Docker image for this runtime. |
is | boolean | Enabled for runtime enums that always target the latest available. |
name | string | The name of this runtime, as expected by the Lambda resource. |
supports | boolean | Whether this runtime is integrated with and supported for profiling using Amazon CodeGuru Profiler. |
supports | boolean | Whether the ZipFile (aka inline code) property can be used with this runtime. |
supports | boolean | Whether this runtime supports snapstart. |
family? | Runtime | The runtime family. |
static ALL | Runtime [] | A list of all known Runtime 's. |
static DOTNET_6 | Runtime | The .NET 6 runtime (dotnet6). |
static DOTNET_8 | Runtime | The .NET 8 runtime (dotnet8). |
static DOTNET_CORE_1 | Runtime | The .NET Core 1.0 runtime (dotnetcore1.0). |
static DOTNET_CORE_2 | Runtime | The .NET Core 2.0 runtime (dotnetcore2.0). |
static DOTNET_CORE_2_1 | Runtime | The .NET Core 2.1 runtime (dotnetcore2.1). |
static DOTNET_CORE_3_1 | Runtime | The .NET Core 3.1 runtime (dotnetcore3.1). |
static FROM_IMAGE | Runtime | A special runtime entry to be used when function is using a docker image. |
static GO_1_X | Runtime | The Go 1.x runtime (go1.x). |
static JAVA_11 | Runtime | The Java 11 runtime (java11). |
static JAVA_17 | Runtime | The Java 17 runtime (java17). |
static JAVA_21 | Runtime | The Java 21 runtime (java21). |
static JAVA_8 | Runtime | The Java 8 runtime (java8). |
static JAVA_8_CORRETTO | Runtime | The Java 8 Corretto runtime (java8.al2). |
static NODEJS | Runtime | The NodeJS runtime (nodejs). |
static NODEJS_10_X | Runtime | The NodeJS 10.x runtime (nodejs10.x). |
static NODEJS_12_X | Runtime | The NodeJS 12.x runtime (nodejs12.x). |
static NODEJS_14_X | Runtime | The NodeJS 14.x runtime (nodejs14.x). |
static NODEJS_16_X | Runtime | The NodeJS 16.x runtime (nodejs16.x). |
static NODEJS_18_X | Runtime | The NodeJS 18.x runtime (nodejs18.x). |
static NODEJS_20_X | Runtime | The NodeJS 20.x runtime (nodejs20.x). |
static NODEJS_22_X | Runtime | The NodeJS 22.x runtime (nodejs22.x). |
static NODEJS_4_3 | Runtime | The NodeJS 4.3 runtime (nodejs4.3). |
static NODEJS_6_10 | Runtime | The NodeJS 6.10 runtime (nodejs6.10). |
static NODEJS_8_10 | Runtime | The NodeJS 8.10 runtime (nodejs8.10). |
static NODEJS_LATEST | Runtime | The latest NodeJS version currently available in ALL regions (not necessarily the latest NodeJS version available in YOUR region). |
static PROVIDED | Runtime | The custom provided runtime (provided). |
static PROVIDED_AL2 | Runtime | The custom provided runtime with Amazon Linux 2 (provided.al2). |
static PROVIDED_AL2023 | Runtime | The custom provided runtime with Amazon Linux 2023 (provided.al2023). |
static PYTHON_2_7 | Runtime | The Python 2.7 runtime (python2.7). |
static PYTHON_3_10 | Runtime | The Python 3.10 runtime (python3.10). |
static PYTHON_3_11 | Runtime | The Python 3.11 runtime (python3.11). |
static PYTHON_3_12 | Runtime | The Python 3.12 runtime (python3.12). |
static PYTHON_3_13 | Runtime | The Python 3.13 runtime (python3.13). |
static PYTHON_3_6 | Runtime | The Python 3.6 runtime (python3.6) (not recommended). |
static PYTHON_3_7 | Runtime | The Python 3.7 runtime (python3.7). |
static PYTHON_3_8 | Runtime | The Python 3.8 runtime (python3.8). |
static PYTHON_3_9 | Runtime | The Python 3.9 runtime (python3.9). |
static RUBY_2_5 | Runtime | The Ruby 2.5 runtime (ruby2.5). |
static RUBY_2_7 | Runtime | The Ruby 2.7 runtime (ruby2.7). |
static RUBY_3_2 | Runtime | The Ruby 3.2 runtime (ruby3.2). |
static RUBY_3_3 | Runtime | The Ruby 3.3 runtime (ruby3.3). |
bundlingImage
Type:
Docker
The bundling Docker image for this runtime.
isVariable
Type:
boolean
Enabled for runtime enums that always target the latest available.
name
Type:
string
The name of this runtime, as expected by the Lambda resource.
supportsCodeGuruProfiling
Type:
boolean
Whether this runtime is integrated with and supported for profiling using Amazon CodeGuru Profiler.
supportsInlineCode
Type:
boolean
Whether the ZipFile
(aka inline code) property can be used with this runtime.
supportsSnapStart
Type:
boolean
Whether this runtime supports snapstart.
family?
Type:
Runtime
(optional)
The runtime family.
static ALL
Type:
Runtime
[]
A list of all known Runtime
's.
static DOTNET_6
Type:
Runtime
The .NET 6 runtime (dotnet6).
static DOTNET_8
Type:
Runtime
The .NET 8 runtime (dotnet8).
static DOTNET_CORE_1
⚠️ Deprecated: Legacy runtime no longer supported by AWS Lambda. Migrate to the latest .NET Core runtime.
Type:
Runtime
The .NET Core 1.0 runtime (dotnetcore1.0).
static DOTNET_CORE_2
⚠️ Deprecated: Legacy runtime no longer supported by AWS Lambda. Migrate to the latest .NET Core runtime.
Type:
Runtime
The .NET Core 2.0 runtime (dotnetcore2.0).
static DOTNET_CORE_2_1
⚠️ Deprecated: Legacy runtime no longer supported by AWS Lambda. Migrate to the latest .NET Core runtime.
Type:
Runtime
The .NET Core 2.1 runtime (dotnetcore2.1).
static DOTNET_CORE_3_1
⚠️ Deprecated: Legacy runtime no longer supported by AWS Lambda. Migrate to the latest .NET Core runtime.
Type:
Runtime
The .NET Core 3.1 runtime (dotnetcore3.1).
static FROM_IMAGE
Type:
Runtime
A special runtime entry to be used when function is using a docker image.
static GO_1_X
⚠️ Deprecated: Legacy runtime no longer supported by AWS Lambda. Migrate to the PROVIDED_AL2023 runtime.
Type:
Runtime
The Go 1.x runtime (go1.x).
static JAVA_11
Type:
Runtime
The Java 11 runtime (java11).
static JAVA_17
Type:
Runtime
The Java 17 runtime (java17).
static JAVA_21
Type:
Runtime
The Java 21 runtime (java21).
static JAVA_8
⚠️ Deprecated: Legacy runtime no longer supported by AWS Lambda. Migrate to the latest Java runtime.
Type:
Runtime
The Java 8 runtime (java8).
static JAVA_8_CORRETTO
Type:
Runtime
The Java 8 Corretto runtime (java8.al2).
static NODEJS
⚠️ Deprecated: Legacy runtime no longer supported by AWS Lambda. Migrate to the latest NodeJS runtime.
Type:
Runtime
The NodeJS runtime (nodejs).
static NODEJS_10_X
⚠️ Deprecated: Legacy runtime no longer supported by AWS Lambda. Migrate to the latest NodeJS runtime.
Type:
Runtime
The NodeJS 10.x runtime (nodejs10.x).
static NODEJS_12_X
⚠️ Deprecated: Legacy runtime no longer supported by AWS Lambda. Migrate to the latest NodeJS runtime.
Type:
Runtime
The NodeJS 12.x runtime (nodejs12.x).
static NODEJS_14_X
⚠️ Deprecated: Legacy runtime no longer supported by AWS Lambda. Migrate to the latest NodeJS runtime.
Type:
Runtime
The NodeJS 14.x runtime (nodejs14.x).
static NODEJS_16_X
⚠️ Deprecated: Legacy runtime no longer supported by AWS Lambda. Migrate to the latest NodeJS runtime.
Type:
Runtime
The NodeJS 16.x runtime (nodejs16.x).
static NODEJS_18_X
Type:
Runtime
The NodeJS 18.x runtime (nodejs18.x).
static NODEJS_20_X
Type:
Runtime
The NodeJS 20.x runtime (nodejs20.x).
static NODEJS_22_X
Type:
Runtime
The NodeJS 22.x runtime (nodejs22.x).
static NODEJS_4_3
⚠️ Deprecated: Legacy runtime no longer supported by AWS Lambda. Migrate to the latest NodeJS runtime.
Type:
Runtime
The NodeJS 4.3 runtime (nodejs4.3).
static NODEJS_6_10
⚠️ Deprecated: Legacy runtime no longer supported by AWS Lambda. Migrate to the latest NodeJS runtime.
Type:
Runtime
The NodeJS 6.10 runtime (nodejs6.10).
static NODEJS_8_10
⚠️ Deprecated: Legacy runtime no longer supported by AWS Lambda. Migrate to the latest NodeJS runtime.
Type:
Runtime
The NodeJS 8.10 runtime (nodejs8.10).
static NODEJS_LATEST
Type:
Runtime
The latest NodeJS version currently available in ALL regions (not necessarily the latest NodeJS version available in YOUR region).
static PROVIDED
⚠️ Deprecated: Legacy runtime no longer supported by AWS Lambda. Migrate to the latest provided.al2023 runtime.
Type:
Runtime
The custom provided runtime (provided).
static PROVIDED_AL2
Type:
Runtime
The custom provided runtime with Amazon Linux 2 (provided.al2).
static PROVIDED_AL2023
Type:
Runtime
The custom provided runtime with Amazon Linux 2023 (provided.al2023).
static PYTHON_2_7
⚠️ Deprecated: Legacy runtime no longer supported by AWS Lambda. Migrate to the latest Python runtime.
Type:
Runtime
The Python 2.7 runtime (python2.7).
static PYTHON_3_10
Type:
Runtime
The Python 3.10 runtime (python3.10).
static PYTHON_3_11
Type:
Runtime
The Python 3.11 runtime (python3.11).
static PYTHON_3_12
Type:
Runtime
The Python 3.12 runtime (python3.12).
static PYTHON_3_13
Type:
Runtime
The Python 3.13 runtime (python3.13).
static PYTHON_3_6
⚠️ Deprecated: Legacy runtime no longer supported by AWS Lambda. Migrate to the latest Python runtime.
Type:
Runtime
The Python 3.6 runtime (python3.6) (not recommended).
The Python 3.6 runtime is deprecated as of July 2022.
static PYTHON_3_7
⚠️ Deprecated: Legacy runtime no longer supported by AWS Lambda. Migrate to the latest Python runtime.
Type:
Runtime
The Python 3.7 runtime (python3.7).
static PYTHON_3_8
Type:
Runtime
The Python 3.8 runtime (python3.8).
static PYTHON_3_9
Type:
Runtime
The Python 3.9 runtime (python3.9).
static RUBY_2_5
⚠️ Deprecated: Legacy runtime no longer supported by AWS Lambda. Migrate to the latest Ruby runtime.
Type:
Runtime
The Ruby 2.5 runtime (ruby2.5).
static RUBY_2_7
⚠️ Deprecated: Legacy runtime no longer supported by AWS Lambda. Migrate to the latest Ruby runtime.
Type:
Runtime
The Ruby 2.7 runtime (ruby2.7).
static RUBY_3_2
Type:
Runtime
The Ruby 3.2 runtime (ruby3.2).
static RUBY_3_3
Type:
Runtime
The Ruby 3.3 runtime (ruby3.3).
Methods
Name | Description |
---|---|
runtime | |
to |
runtimeEquals(other)
public runtimeEquals(other: Runtime): boolean
Parameters
- other
Runtime
Returns
boolean
toString()
public toString(): string
Returns
string