Migrate from classic AWS Lambda integration

  • 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.

Comparison between classic and latest AWS Lambda

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

Features comparison

FeatureAWS Lambda (classic)AWS Lambda (latest)
Supported sensorsFew built-inMany built-in
Cold start invocation overhead (typical)<4000ms<1500ms
Warm start invocation overhead (typical)70–80ms60ms
Response time overhead (typical)20ms<5ms
Log enrichmentManualAutomatic for supported frameworks, structured logs
Layer size for traces-only layer<10MB>15MB depending on OneAgent
Token stored in Secret ManagerSupported for non-SnapStartSupported
OpenTelemetry integrationSupportedSupported
Code baseBased on OpenTelemetry SDKOneAgent

Runtime-specific comparison

RuntimeFeatureAWS Lambda (classic)AWS Lambda (latest)

Java

Minimum memory

1500MB

128MB

Handler function definition

In class

In class or base class

Supported runtimes

8, 11, 17, 21

11, 17, 21

SnapStart

Supported

Supported

Node.js

Module type

CommonJS

CommonJS

Supported runtimes

16, 18, 20, 22

20, 22

Python

Supported runtimes

3.9, 3.10, 3.11, 3.12, 3.13

3.9, 3.10, 3.11, 3.12, 3.13

Related tags
Infrastructure Observability