aws-cdk-lib.aws_lambda.AdotLambdaLayerJavaScriptSdkVersion

class AdotLambdaLayerJavaScriptSdkVersion

LanguageType name
.NETAmazon.CDK.AWS.Lambda.AdotLambdaLayerJavaScriptSdkVersion
Gogithub.com/aws/aws-cdk-go/awscdk/v2/awslambda#AdotLambdaLayerJavaScriptSdkVersion
Javasoftware.amazon.awscdk.services.lambda.AdotLambdaLayerJavaScriptSdkVersion
Pythonaws_cdk.aws_lambda.AdotLambdaLayerJavaScriptSdkVersion
TypeScript (source)aws-cdk-lib » aws_lambda » AdotLambdaLayerJavaScriptSdkVersion

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

Example

import {
  AdotLambdaExecWrapper,
  AdotLayerVersion,
  AdotLambdaLayerJavaScriptSdkVersion,
} from 'aws-cdk-lib/aws-lambda';

const fn = new lambda.Function(this, 'MyFunction', {
  runtime: lambda.Runtime.NODEJS_18_X,
  handler: 'index.handler',
  code: lambda.Code.fromInline('exports.handler = function(event, ctx, cb) { return cb(null, "hi"); }'),
  adotInstrumentation: {
    layerVersion: AdotLayerVersion.fromJavaScriptSdkLayerVersion(AdotLambdaLayerJavaScriptSdkVersion.LATEST),
    execWrapper: AdotLambdaExecWrapper.REGULAR_HANDLER,
  },
});

Properties

NameTypeDescription
layerVersionstring
static LATESTAdotLambdaLayerJavaScriptSdkVersionThe latest layer version available in this CDK version.
static V1_7_0AdotLambdaLayerJavaScriptSdkVersionVersion 1.7.0.

layerVersion

Type: string


static LATEST

Type: AdotLambdaLayerJavaScriptSdkVersion

The latest layer version available in this CDK version.

New versions could introduce incompatible changes. Make sure to test them before deploying to production.


static V1_7_0

Type: AdotLambdaLayerJavaScriptSdkVersion

Version 1.7.0.

Methods

NameDescription
layerArn(scope, architecture)The ARN of the Lambda layer.

layerArn(scope, architecture)

public layerArn(scope: IConstruct, architecture: Architecture): string

Parameters

  • scope IConstruct — The binding scope.
  • architecture Architecture — The architecture of the Lambda layer (either X86_64 or ARM_64).

Returns

  • string

The ARN of the Lambda layer.