Migrate from classic AWS Lambda integration

  • Dynatrace Classic
  • How-to guide
  • 2-min read

AWS Lambda functions monitored with classic OneAgent layers should be updated to the latest generation monitoring layer to take full advantage of Dynatrace’s enhanced observability capabilities.

To migrate AWS Lambda functions currently monitored with classic OneAgent layers

  1. Review the system requirements of the latest generation AWS Lambda monitoring layer.
  2. Remove the classic layer from the AWS Lambda function.
  3. Remove the configuration (environment variables starting with DT or the dtconfig.json file).
  4. Follow the setup instructions in Trace Lambda functions.

Alternatively, you can reuse the configuration created for the classic AWS Lambda layer with the following adaptations that make the latest generation of Dynatrace AWS Lambda monitoring backward-compatible.

  • Change the name of the environment variable DT_CLUSTER_ID to DT_CLUSTER.
  • Change the default status of OpenTelemetry integration to disabled by doing one of the following:
    • Remove the environment variable DT_OPEN_TELEMETRY_ENABLE_INTEGRATION
    • Remove the entry OpenTelemetry.EnableIntegration from the dtconfig.json file.

Once these adaptations are complete, remove the classic layer and add the latest generation layer. Ensure that the selected layer matches the correct architecture and be aware of differences in system requirements and available features. The latest generation layers are located in a different Dynatrace AWS account than the classic layers. That's why the account number part of the layer ARN changes from 725887861453 to 585768157899.

Comparison between classic and latest AWS Lambda

The tables below compare key features and performance metrics between the classic and latest AWS Lambda implementations.

Feature comparison

The table below compares features for Java layers tested in hello-world Lambda functions (only returning a response) with 512 MB of allocated memory.

FeatureAWS Lambda (classic)AWS Lambda (latest)

Supported sensors

Few built-in

Many built-in

Cold start invocation overhead (typical)

< 4,000 ms

< 1,500 ms

Warm start invocation overhead (typical)

70–80 ms

60 ms

Response time overhead (typical)

20 ms

< 5 ms

Log enrichment

Manual

Automatic for supported frameworks, structured logs

Layer size for traces-only layer

< 10 MB

> 15 MB, depending on OneAgent

Token stored in Secret Manager

Supported for non-SnapStart

Supported

OpenTelemetry integration

Supported

Supported

Code base

Based on OpenTelemetry SDK

OneAgent

Runtime-specific comparison

RuntimeFeatureAWS Lambda (classic)AWS Lambda (latest)

Java

Minimum memory

1,500 MB

128 MB

Java

Handler function definition

In class

In class or base class

Java

Supported runtimes

8, 11, 17, 21

11, 17, 21

Java

SnapStart

Supported

Supported

Node.js

Module type

CommonJS

CommonJS, ESM (opt-in)

Node.js

Supported runtimes

16, 18, 20, 22

20, 22, 241

Python

Supported runtimes

3.9, 3.10, 3.11, 3.12, 3.13, 3.14

3.9, 3.10, 3.11, 3.12, 3.13, 3.14

1

Requires OneAgent version 1.329+.

Related tags
Infrastructure ObservabilityAWS