class Runtime
Language | Type name |
---|---|
.NET | Amazon.CDK.AWS.Lambda.Runtime |
Java | software.amazon.awscdk.services.lambda.Runtime |
Python | aws_cdk.aws_lambda.Runtime |
TypeScript (source) | @aws-cdk/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/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_16_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 | Bundling | DEPRECATED. |
bundling | Docker | The bundling Docker image for this runtime. |
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. |
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_CORE_1 | Runtime | The .NET Core 1.0 runtime (dotnetcore1.0) Legacy runtime no longer supported by AWS Lambda. Migrate to the latest .NET Core runtime. |
static DOTNET_CORE_2 | Runtime | The .NET Core 2.0 runtime (dotnetcore2.0) Legacy runtime no longer supported by AWS Lambda. Migrate to the latest .NET Core runtime. |
static DOTNET_CORE_2_1 | Runtime | The .NET Core 2.1 runtime (dotnetcore2.1) Legacy runtime no longer supported by AWS Lambda. Migrate to the latest .NET Core runtime. |
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_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_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 PROVIDED | Runtime | The custom provided runtime (provided). |
static PROVIDED_AL2 | Runtime | The custom provided runtime (provided). |
static PYTHON_2_7 | Runtime | The Python 2.7 runtime (python2.7). |
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) Legacy runtime no longer supported by AWS Lambda. Migrate to the latest Ruby runtime. |
static RUBY_2_7 | Runtime | The Ruby 2.7 runtime (ruby2.7). |
bundlingDockerImage
⚠️ Deprecated: use bundlingImage
Type:
Bundling
DEPRECATED.
bundlingImage
Type:
Docker
The bundling Docker image for this runtime.
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.
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_CORE_1
Type:
Runtime
The .NET Core 1.0 runtime (dotnetcore1.0) Legacy runtime no longer supported by AWS Lambda. Migrate to the latest .NET Core runtime.
static DOTNET_CORE_2
Type:
Runtime
The .NET Core 2.0 runtime (dotnetcore2.0) Legacy runtime no longer supported by AWS Lambda. Migrate to the latest .NET Core runtime.
static DOTNET_CORE_2_1
Type:
Runtime
The .NET Core 2.1 runtime (dotnetcore2.1) Legacy runtime no longer supported by AWS Lambda. Migrate to the latest .NET Core runtime.
static DOTNET_CORE_3_1
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
Type:
Runtime
The Go 1.x runtime (go1.x).
static JAVA_11
Type:
Runtime
The Java 11 runtime (java11).
static JAVA_8
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
Type:
Runtime
The NodeJS 12.x runtime (nodejs12.x).
static NODEJS_14_X
Type:
Runtime
The NodeJS 14.x runtime (nodejs14.x).
static NODEJS_16_X
Type:
Runtime
The NodeJS 16.x runtime (nodejs16.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 PROVIDED
Type:
Runtime
The custom provided runtime (provided).
static PROVIDED_AL2
Type:
Runtime
The custom provided runtime (provided).
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_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
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
Type:
Runtime
The Ruby 2.5 runtime (ruby2.5) Legacy runtime no longer supported by AWS Lambda. Migrate to the latest Ruby runtime.
static RUBY_2_7
Type:
Runtime
The Ruby 2.7 runtime (ruby2.7).
Methods
Name | Description |
---|---|
runtime | |
to |
Equals(other)
runtimepublic runtimeEquals(other: Runtime): boolean
Parameters
- other
Runtime
Returns
boolean
String()
topublic toString(): string
Returns
string