# LambdaInsightsVersion

Version of CloudWatch Lambda Insights.

Obtainable from: LambdaInsightsVersion.VERSION_1_0_119_0, LambdaInsightsVersion.VERSION_1_0_135_0, LambdaInsightsVersion.VERSION_1_0_143_0, LambdaInsightsVersion.VERSION_1_0_178_0, LambdaInsightsVersion.VERSION_1_0_229_0, LambdaInsightsVersion.VERSION_1_0_273_0, LambdaInsightsVersion.VERSION_1_0_275_0, LambdaInsightsVersion.VERSION_1_0_295_0, LambdaInsightsVersion.VERSION_1_0_317_0, LambdaInsightsVersion.VERSION_1_0_333_0, LambdaInsightsVersion.VERSION_1_0_391_0, LambdaInsightsVersion.VERSION_1_0_404_0, LambdaInsightsVersion.VERSION_1_0_498_0, LambdaInsightsVersion.VERSION_1_0_54_0, LambdaInsightsVersion.VERSION_1_0_86_0, LambdaInsightsVersion.VERSION_1_0_89_0, LambdaInsightsVersion.VERSION_1_0_98_0, LambdaInsightsVersion.fromInsightVersionArn

- Source: [`aws-lambda/lib/lambda-insights.ts`](https://github.com/aws/aws-cdk/blob/v2.277.0/packages/aws-cdk-lib/aws-lambda/lib/lambda-insights.ts#L24)
- Type last changed: v2.233.0 · 18 Dec 2025

## Example

TypeScript:

```ts
const layerArn = 'arn:aws:lambda:us-east-1:580247275435:layer:LambdaInsightsExtension:14';
new lambda.Function(this, 'MyFunction', {
  runtime: lambda.Runtime.NODEJS_LATEST,
  handler: 'index.handler',
  code: lambda.Code.fromAsset(path.join(__dirname, 'lambda-handler')),
  insightsVersion: lambda.LambdaInsightsVersion.fromInsightVersionArn(layerArn),
});
```

Python:

```python
layer_arn = "arn:aws:lambda:us-east-1:580247275435:layer:LambdaInsightsExtension:14"
lambda_.Function(self, "MyFunction",
    runtime=lambda_.Runtime.NODEJS_LATEST,
    handler="index.handler",
    code=lambda_.Code.from_asset(path.join(__dirname, "lambda-handler")),
    insights_version=lambda_.LambdaInsightsVersion.from_insight_version_arn(layer_arn)
)
```

Java:

```java
String layerArn = "arn:aws:lambda:us-east-1:580247275435:layer:LambdaInsightsExtension:14";
Function.Builder.create(this, "MyFunction")
        .runtime(Runtime.NODEJS_LATEST)
        .handler("index.handler")
        .code(Code.fromAsset(join(__dirname, "lambda-handler")))
        .insightsVersion(LambdaInsightsVersion.fromInsightVersionArn(layerArn))
        .build();
```

C# / .NET:

```csharp
// Install: dotnet add package Amazon.CDK.Lib
var layerArn = "arn:aws:lambda:us-east-1:580247275435:layer:LambdaInsightsExtension:14";
new Function(this, "MyFunction", new FunctionProps {
    Runtime = Runtime.NODEJS_LATEST,
    Handler = "index.handler",
    Code = Code.FromAsset(Join(__dirname, "lambda-handler")),
    InsightsVersion = LambdaInsightsVersion.FromInsightVersionArn(layerArn)
});
```

Golang:

```go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
layerArn := "arn:aws:lambda:us-east-1:580247275435:layer:LambdaInsightsExtension:14"
lambda.NewFunction(this, jsii.String("MyFunction"), &FunctionProps{
	Runtime: lambda.Runtime_NODEJS_LATEST(),
	Handler: jsii.String("index.handler"),
	Code: lambda.Code_FromAsset(path.join(__dirname, jsii.String("lambda-handler"))),
	InsightsVersion: lambda.LambdaInsightsVersion_FromInsightVersionArn(layerArn),
})
```

## Initializer

TypeScript:

```ts
new LambdaInsightsVersion()
```

Python:

```python
LambdaInsightsVersion()
```

Java:

```java
new LambdaInsightsVersion()
```

C# / .NET:

```csharp
new LambdaInsightsVersion()
```

Golang:

```go
NewLambdaInsightsVersion()
```

## Properties

- `layerVersionArn`: string — The arn of the Lambda Insights extension.

- `VERSION_1_0_119_0`: [LambdaInsightsVersion](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_lambda.LambdaInsightsVersion.html) (static) — Version 1.0.119.0.

- `VERSION_1_0_135_0`: [LambdaInsightsVersion](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_lambda.LambdaInsightsVersion.html) (static) — Version 1.0.135.0.

- `VERSION_1_0_143_0`: [LambdaInsightsVersion](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_lambda.LambdaInsightsVersion.html) (static) — Version 1.0.143.0.

- `VERSION_1_0_178_0`: [LambdaInsightsVersion](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_lambda.LambdaInsightsVersion.html) (static) — Version 1.0.178.0.

- `VERSION_1_0_229_0`: [LambdaInsightsVersion](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_lambda.LambdaInsightsVersion.html) (static) — Version 1.0.229.0.

- `VERSION_1_0_273_0`: [LambdaInsightsVersion](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_lambda.LambdaInsightsVersion.html) (static) — Version 1.0.273.0.

- `VERSION_1_0_275_0`: [LambdaInsightsVersion](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_lambda.LambdaInsightsVersion.html) (static) — Version 1.0.275.0.

- `VERSION_1_0_295_0`: [LambdaInsightsVersion](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_lambda.LambdaInsightsVersion.html) (static) — Version 1.0.295.0.

- `VERSION_1_0_317_0`: [LambdaInsightsVersion](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_lambda.LambdaInsightsVersion.html) (static) — Version 1.0.317.0.

- `VERSION_1_0_333_0`: [LambdaInsightsVersion](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_lambda.LambdaInsightsVersion.html) (static) — Version 1.0.333.0.

- `VERSION_1_0_391_0`: [LambdaInsightsVersion](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_lambda.LambdaInsightsVersion.html) (static) — Version 1.0.391.0.

- `VERSION_1_0_404_0`: [LambdaInsightsVersion](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_lambda.LambdaInsightsVersion.html) (static) — Version 1.0.404.0.

- `VERSION_1_0_498_0`: [LambdaInsightsVersion](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_lambda.LambdaInsightsVersion.html) (static) — Version 1.0.498.0.

- `VERSION_1_0_54_0`: [LambdaInsightsVersion](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_lambda.LambdaInsightsVersion.html) (static) — Version 1.0.54.0.

- `VERSION_1_0_86_0`: [LambdaInsightsVersion](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_lambda.LambdaInsightsVersion.html) (static) — Version 1.0.86.0.

- `VERSION_1_0_89_0`: [LambdaInsightsVersion](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_lambda.LambdaInsightsVersion.html) (static) — Version 1.0.89.0.

- `VERSION_1_0_98_0`: [LambdaInsightsVersion](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_lambda.LambdaInsightsVersion.html) (static) — Version 1.0.98.0.

## Methods

- `fromInsightVersionArn(arn: string): LambdaInsightsVersion // chainable` (static) — Use the insights extension associated with the provided ARN.

  Make sure the ARN is associated
  with same region as your function
