---
title: Continuous Profiler for AWS Lambda
description: Datadog, the leading service for cloud-scale monitoring.
breadcrumbs: >-
  Docs > Serverless > Serverless Monitoring for AWS Lambda > Continuous Profiler
  for AWS Lambda
---

# Continuous Profiler for AWS Lambda

{% image
   source="https://datadog-docs.imgix.net/images/serverless/lambda/profiling_hero.f2f54c0707744e398c3d82336c1826d2.png?auto=format"
   alt="Continuous Profiling for AWS Lambda" /%}

Datadog's [Continuous Profiler](https://docs.datadoghq.com/profiler/) for AWS Lambda functions gives you visibility into the exact method name, class name, and line number in your Lambda code that is causing CPU or I/O bottlenecks.

{% alert level="danger" %}
Continuous Profiler for AWS Lambda is in Preview.
{% /alert %}

## Usage{% #usage %}

To enable profiling:

1. Ensure you have [installed the associated tracing library](https://docs.datadoghq.com/serverless/installation) in your Lambda function.
1. Set the `DD_PROFILING_ENABLED` environment variable to `true`.

Data is available after a minimum of 60 execution seconds of the Lambda function.

The profiler works by spawning a thread that periodically wakes up and takes a snapshot of the CPU and heap of running code. This includes the profiler itself. If you want the profiler to ignore itself, set `DD_PROFILING_IGNORE_PROFILER` to `true`.

### Support{% #support %}

Depending on your runtime, this feature requires the following tracer and layer versions:

| Runtime | Minimum tracer version | Minimum layer version |
| ------- | ---------------------- | --------------------- |
| Python  | 1.4.0                  | 62                    |
| Node.js | 2.22.1, 3.9.0          | 78                    |

## Further Reading{% #further-reading %}

- [Continuous Profiler](https://docs.datadoghq.com/profiler/)
- [Distributed Tracing for AWS Lambda](https://docs.datadoghq.com/serverless/distributed_tracing)
