Show / Hide Table of Contents

Class RuntimeManagementMode

Specify the runtime update mode.

Inheritance
object
RuntimeManagementMode
Namespace: Amazon.CDK.AWS.Lambda
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class RuntimeManagementMode : DeputyBase
Syntax (vb)
Public Class RuntimeManagementMode Inherits DeputyBase
Remarks

ExampleMetadata: infused

Examples
new Function(this, "Lambda", new FunctionProps {
                RuntimeManagementMode = RuntimeManagementMode.AUTO,
                Runtime = Runtime.NODEJS_18_X,
                Handler = "index.handler",
                Code = Code.FromAsset(Join(__dirname, "lambda-handler"))
            });

Synopsis

Constructors

RuntimeManagementMode(string, string?)

Specify the runtime update mode.

Properties

AUTO

Automatically update to the most recent and secure runtime version using Two-phase runtime version rollout.

Arn

Specify the runtime update mode.

FUNCTION_UPDATE

When you update your function, Lambda updates the runtime of your function to the most recent and secure runtime version.

Mode

Specify the runtime update mode.

RuntimeManagementConfig

https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lambda-function-runtimemanagementconfig.html.

Methods

Manual(string)

You specify a runtime version in your function configuration.

Constructors

RuntimeManagementMode(string, string?)

Specify the runtime update mode.

public RuntimeManagementMode(string mode, string? arn = null)
Parameters
mode string
arn string
Remarks

ExampleMetadata: infused

Examples
new Function(this, "Lambda", new FunctionProps {
                RuntimeManagementMode = RuntimeManagementMode.AUTO,
                Runtime = Runtime.NODEJS_18_X,
                Handler = "index.handler",
                Code = Code.FromAsset(Join(__dirname, "lambda-handler"))
            });

Properties

AUTO

Automatically update to the most recent and secure runtime version using Two-phase runtime version rollout.

public static RuntimeManagementMode AUTO { get; }
Property Value

RuntimeManagementMode

Remarks

We recommend this mode for most customers so that you always benefit from runtime updates.

Arn

Specify the runtime update mode.

public virtual string? Arn { get; }
Property Value

string

Remarks

ExampleMetadata: infused

Examples
new Function(this, "Lambda", new FunctionProps {
                RuntimeManagementMode = RuntimeManagementMode.AUTO,
                Runtime = Runtime.NODEJS_18_X,
                Handler = "index.handler",
                Code = Code.FromAsset(Join(__dirname, "lambda-handler"))
            });

FUNCTION_UPDATE

When you update your function, Lambda updates the runtime of your function to the most recent and secure runtime version.

public static RuntimeManagementMode FUNCTION_UPDATE { get; }
Property Value

RuntimeManagementMode

Remarks

This approach synchronizes runtime updates with function deployments, giving you control over when Lambda applies runtime updates. With this mode, you can detect and mitigate rare runtime update incompatibilities early. When using this mode, you must regularly update your functions to keep their runtime up to date.

Mode

Specify the runtime update mode.

public virtual string Mode { get; }
Property Value

string

Remarks

ExampleMetadata: infused

Examples
new Function(this, "Lambda", new FunctionProps {
                RuntimeManagementMode = RuntimeManagementMode.AUTO,
                Runtime = Runtime.NODEJS_18_X,
                Handler = "index.handler",
                Code = Code.FromAsset(Join(__dirname, "lambda-handler"))
            });

RuntimeManagementConfig

https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lambda-function-runtimemanagementconfig.html.

public virtual CfnFunction.IRuntimeManagementConfigProperty RuntimeManagementConfig { get; }
Property Value

CfnFunction.IRuntimeManagementConfigProperty

Remarks

ExampleMetadata: infused

Methods

Manual(string)

You specify a runtime version in your function configuration.

public static RuntimeManagementMode Manual(string arn)
Parameters
arn string
Returns

RuntimeManagementMode

Remarks

The function uses this runtime version indefinitely. In the rare case in which a new runtime version is incompatible with an existing function, you can use this mode to roll back your function to an earlier runtime version.

Back to top Generated by DocFX