--- id: datadog-cdk-constructs-v2 version: "4.2.0" license: Apache-2.0 license_treatment: permissive maintenance: active --- # datadog-cdk-constructs-v2 — CDK Construct Library to automatically instrument Python and Node Lambda functions with Datadog using AWS CDK v2 License: permissive · Maintenance: active · Downloads: 267.6K/mo ## What it is and what it does This package is an AWS CDK construct library that wraps Datadog's Lambda instrumentation layers and configuration into reusable, declarative CDK components. Instead of manually attaching Datadog Lambda layers, managing API keys, and configuring log subscriptions in your CDK stack, you instantiate a DatadogLambda construct, pass it your Lambda functions, and the construct handles layer installation, tracing setup, and log forwarding automatically. It supports Lambda functions across multiple runtimes (Python, Node.js, Java, Go, Ruby, .NET) and also provides constructs for ECS Fargate services. The library integrates with AWS Secrets Manager for secure API key storage, supports custom tagging and environment variables, and can automatically enable source code integration if your Datadog GitHub integration is configured. It's designed for teams using AWS CDK v2 who want to add Datadog observability to serverless workloads without boilerplate. Use it for: - Automatically instrument all Lambda functions in a CDK stack with Datadog tracing and custom metrics in a single construct call. - Centrally manage Datadog API keys and layer versions across multiple Lambda functions deployed via CDK. - Enable distributed tracing and log correlation for serverless applications by adding the construct to your stack. - Set up Datadog log forwarding from CloudWatch log groups without manually creating subscriptions. - Deploy ECS Fargate services with built-in Datadog monitoring through a dedicated construct. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Provides AWS CDK constructs to automatically instrument Lambda functions and ECS Fargate services with Datadog monitoring, configuring metrics, traces, and logs collection without manual layer management. Yes. This is a production-stable, actively maintained library (latest release 43 days ago, no known vulnerabilities) that significantly reduces boilerplate for Datadog-instrumented serverless deployments on AWS CDK. Install it if you are already using AWS CDK v2 and want Datadog observability; it saves configuration effort and enforces consistent instrumentation across your Lambda and Fargate workloads. The Apache-2.0 license imposes no restrictions. ## Install pip install datadog-cdk-constructs-v2 uv add datadog-cdk-constructs-v2 poetry add datadog-cdk-constructs-v2 ## Installing datadog-cdk-constructs-v2 Before you install: Low install friction with a pure-Python wheel. Actively maintained with a recent release 43 days ago. Requires aws-cdk-lib, constructs, jsii, and publication as runtime dependencies—all standard CDK ecosystem packages. License in practice: Licensed under Apache-2.0 (permissive). You can use, modify, and distribute this package freely in commercial and private projects, with no copyleft obligations beyond retaining the license notice. Quickstart: pip install datadog-cdk-constructs-v2 from datadog_cdk_constructs_v2 import DatadogLambda, DatadogDefaultLayerVersions import os datadog = DatadogLambda( self, "Datadog", extension_layer_version=DatadogDefaultLayerVersions.EXTENSION, api_key=os.getenv("DD_API_KEY"), ) datadog.add_lambda_functions([my_lambda_function]) Requires Python 3.10 or later. You must have aws-cdk-lib and constructs installed, and a valid Datadog API key passed via environment variable or CDK parameter. Verify before relying: - Whether the package supports all Lambda runtimes mentioned (Python, Node.js, Java, Go, Ruby, .NET) equally well from the CDK side, or if some have limitations. - Performance overhead or cold-start impact of the Datadog Lambda layers when applied via this construct. - Whether ECS Fargate support is production-ready or still in beta relative to Lambda support. ## Package facts - License: Apache-2.0 (permissive) - Python support: supports_current - Install friction: low - Maintenance: active - Downloads: 267.6K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags aws cdk datadog lambda instrumentation, serverless monitoring with datadog, cdk construct datadog integration, lambda tracing and metrics datadog, aws cdk observability, datadog lambda layer automation, cdk serverless monitoring, aws-cdk, serverless-monitoring, datadog-integration [View on SkillFed](https://skillfed.io/packages/datadog-cdk-constructs-v2) · [View on PyPI](https://pypi.org/project/datadog-cdk-constructs-v2/)