AdotLambdaLayerJavaScriptSdkVersion

class aws_cdk.aws_lambda.AdotLambdaLayerJavaScriptSdkVersion(*args: Any, **kwargs)

Bases: object

The collection of versions of the ADOT Lambda Layer for JavaScript SDK.

ExampleMetadata:

infused

Example:

from aws_cdk.aws_lambda import AdotLambdaExecWrapper, AdotLayerVersion, AdotLambdaLayerJavaScriptSdkVersion


fn = lambda_.Function(self, "MyFunction",
    runtime=lambda_.Runtime.NODEJS_18_X,
    handler="index.handler",
    code=lambda_.Code.from_inline("exports.handler = function(event, ctx, cb) { return cb(null, "hi"); }"),
    adot_instrumentation=lambda.AdotInstrumentationConfig(
        layer_version=AdotLayerVersion.from_java_script_sdk_layer_version(AdotLambdaLayerJavaScriptSdkVersion.LATEST),
        exec_wrapper=AdotLambdaExecWrapper.REGULAR_HANDLER
    )
)

Methods

layer_arn(scope, architecture)

The ARN of the Lambda layer.

Parameters:
  • scope (IConstruct) – The binding scope. Usually this is the stack where the Lambda layer is bound to

  • architecture (Architecture) – The architecture of the Lambda layer (either X86_64 or ARM_64).

Return type:

str

Attributes

LATEST = <aws_cdk.aws_lambda.AdotLambdaLayerJavaScriptSdkVersion object>
V1_15_0_1 = <aws_cdk.aws_lambda.AdotLambdaLayerJavaScriptSdkVersion object>
V1_16_0 = <aws_cdk.aws_lambda.AdotLambdaLayerJavaScriptSdkVersion object>
V1_17_1 = <aws_cdk.aws_lambda.AdotLambdaLayerJavaScriptSdkVersion object>
V1_18_1 = <aws_cdk.aws_lambda.AdotLambdaLayerJavaScriptSdkVersion object>
V1_7_0 = <aws_cdk.aws_lambda.AdotLambdaLayerJavaScriptSdkVersion object>