or run

npx @tessl/cli init
Log in

Version

Tile

Overview

Evals

Files

Files

docs

account-settings.mdalias-version-management.mdclient-management.mdconcurrency-performance.mdevent-source-mapping.mdfunction-invocation.mdfunction-management.mdfunction-url-management.mdhigh-level-invocation.mdindex.mdlayer-management.mdpermissions-policies.mdruntime-management.mdsecurity-code-signing.mdtagging.mdwaiters-polling.md

runtime-management.mddocs/

0

# Runtime Management

1

2

Runtime management provides control over Lambda function runtime versions and update policies, enabling fine-grained control over when and how runtime updates are applied to functions.

3

4

## Capabilities

5

6

### Get Runtime Management Configuration

7

8

Retrieves the current runtime management configuration for a function's version, including update mode and runtime ARN.

9

10

```java { .api }

11

/**

12

* Retrieves the runtime management configuration for a function's version

13

* @param getRuntimeManagementConfigRequest - Request specifying function and version

14

* @return GetRuntimeManagementConfigResult with current runtime configuration

15

*/

16

GetRuntimeManagementConfigResult getRuntimeManagementConfig(GetRuntimeManagementConfigRequest getRuntimeManagementConfigRequest);

17

```

18

19

**Usage Example:**

20

21

```java

22

import com.amazonaws.services.lambda.*;

23

import com.amazonaws.services.lambda.model.*;

24

25

AWSLambda lambdaClient = AWSLambdaClientBuilder.standard()

26

.withRegion("us-east-1")

27

.build();

28

29

// Get runtime configuration for a function

30

GetRuntimeManagementConfigRequest getRequest = new GetRuntimeManagementConfigRequest()

31

.withFunctionName("my-function")

32

.withQualifier("$LATEST");

33

34

GetRuntimeManagementConfigResult result = lambdaClient.getRuntimeManagementConfig(getRequest);

35

System.out.println("Update mode: " + result.getUpdateRuntimeOn());

36

System.out.println("Runtime ARN: " + result.getRuntimeVersionArn());

37

```

38

39

### Put Runtime Management Configuration

40

41

Sets the runtime management configuration for a function's version, controlling how runtime updates are applied.

42

43

```java { .api }

44

/**

45

* Sets the runtime management configuration for a function's version

46

* @param putRuntimeManagementConfigRequest - Configuration specifying update policy

47

* @return PutRuntimeManagementConfigResult confirming the configuration update

48

*/

49

PutRuntimeManagementConfigResult putRuntimeManagementConfig(PutRuntimeManagementConfigRequest putRuntimeManagementConfigRequest);

50

```

51

52

**Usage Example:**

53

54

```java

55

// Set manual runtime update mode

56

PutRuntimeManagementConfigRequest putRequest = new PutRuntimeManagementConfigRequest()

57

.withFunctionName("my-function")

58

.withQualifier("$LATEST")

59

.withUpdateRuntimeOn(UpdateRuntimeOn.Manual)

60

.withRuntimeVersionArn("arn:aws:lambda:us-east-1::runtime:java11:1234567890");

61

62

PutRuntimeManagementConfigResult putResult = lambdaClient.putRuntimeManagementConfig(putRequest);

63

System.out.println("Runtime configuration updated");

64

```

65

66

## Types

67

68

```java { .api }

69

// Runtime update modes

70

public enum UpdateRuntimeOn {

71

Auto, Manual, FunctionUpdate

72

}

73

74

// Runtime management configuration

75

public class RuntimeVersionConfig {

76

private String runtimeVersionArn;

77

private String error;

78

// ... getters and setters

79

}

80

81

// Runtime management configuration request/result types

82

public class GetRuntimeManagementConfigRequest {

83

private String functionName;

84

private String qualifier;

85

// ... getters and setters

86

}

87

88

public class GetRuntimeManagementConfigResult {

89

private String updateRuntimeOn;

90

private String runtimeVersionArn;

91

private String functionArn;

92

// ... getters and setters

93

}

94

95

public class PutRuntimeManagementConfigRequest {

96

private String functionName;

97

private String qualifier;

98

private UpdateRuntimeOn updateRuntimeOn;

99

private String runtimeVersionArn;

100

// ... getters and setters

101

}

102

```

103

104

## Runtime Update Policies

105

106

**Auto**: Lambda automatically updates the function to use the latest available runtime version.

107

108

**Manual**: Runtime updates require explicit configuration changes via `putRuntimeManagementConfig`.

109

110

**FunctionUpdate**: Runtime updates occur only when the function code or configuration is updated.