AdotLayerVersion

class aws_cdk.aws_lambda.AdotLayerVersion

Bases: object

An ADOT Lambda layer version that’s specific to a lambda layer type and an architecture.

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
    )
)

Static Methods

classmethod from_generic_layer_version(version)

The ADOT Lambda layer for generic use cases.

Parameters:

version (AdotLambdaLayerGenericVersion) – The version of the Lambda layer to use.

Return type:

AdotLayerVersion

classmethod from_java_auto_instrumentation_layer_version(version)

The ADOT Lambda layer for Java auto instrumentation.

Parameters:

version (AdotLambdaLayerJavaAutoInstrumentationVersion) – The version of the Lambda layer to use.

Return type:

AdotLayerVersion

classmethod from_java_script_sdk_layer_version(version)

The ADOT Lambda layer for JavaScript SDK.

Parameters:

version (AdotLambdaLayerJavaScriptSdkVersion) – The version of the Lambda layer to use.

Return type:

AdotLayerVersion

classmethod from_java_sdk_layer_version(version)

The ADOT Lambda layer for Java SDK.

Parameters:

version (AdotLambdaLayerJavaSdkVersion) – The version of the Lambda layer to use.

Return type:

AdotLayerVersion

classmethod from_python_sdk_layer_version(version)

The ADOT Lambda layer for Python SDK.

Parameters:

version (AdotLambdaLayerPythonSdkVersion) – The version of the Lambda layer to use.

Return type:

AdotLayerVersion