Skip to main content

AWS Cloud Development Kit (CDK) Datadog Integration

This construct makes it easy to integrate your AWS account with Datadog. It creates nested stacks based on the official Datadog Cloudformation templates using Amazon Cloud Development Kit (CDK).

Warning

⚠️ This construct does not use the newest Datadog CloudFormation template because sensitive parameters must be hard-coded. See https://github.com/DataDog/cloudformation-template/issues/68 for an upstream feature request. ⚠️

This construct will still work, but it cannot be updated to the latest integration template until the upstream issue is fixed. Please add a +1 to https://github.com/DataDog/cloudformation-template/issues/68 to help prioritize it.

Basic Usage

  1. Install the package

    npm i --save cdk-datadog-integration
    

    Or via pypi, NuGet, or GitHub Packages.

  2. Import the stack and pass the required parameters.

    import * as cdk from "aws-cdk-lib";
    import { MonitoringInfrastructureStack } from "../lib/monitoring-infrastructure-stack";
    
    const app = new cdk.App();
    new MonitoringInfrastructureStack(app, "MonitoringInfrastructure");
    
    import * as cdk from "aws-cdk-lib";
    import * as secrets from "aws-cdk-lib/aws-secretsmanager";
    import { DatadogIntegration } from "cdk-datadog-integration";
    
    export class MonitoringInfrastructureStack extends cdk.Stack {
      constructor(scope: cdk.App, id: string, props?: cdk.StackProps) {
        super(scope, id, props);
    
        const datadog = new DatadogIntegration(this, "Datadog", {
          // Generate an ID here: https://app.datadoghq.com/account/settings#integrations/amazon-web-services
          externalId: "",
    
          // Create or lookup a `Secret` that contains your Datadog API Key
          // See https://docs.aws.amazon.com/cdk/api/latest/docs/aws-secretsmanager-readme.html for details on Secrets in CDK
          // Get your API key here: https://app.datadoghq.com/account/settings#api
          apiKey: secrets.Secret.fromSecretNameV2(
            this,
            "DatadogApiKey",
            "<your secret name>"
          ),
        });
      }
    }
    

Configuration

Use DatadogIntegrationConfig to set additional configuration parameters. Check out docs for more details on what's available.

Additionally, a CDK Construct is exposed, should you want to add additional customizations vs. using the out-of-the-box Stack.

CDK Version Compatibility

This package is expected to work with all recent versions of CDK v2. It has been tested with 2.1.0 so almost certainly works will all newer versions, and probably works with some older versions too, but is untested.

If you're still on CDK v1, you can use cdk-datadog-integration@1, but this version is unmaintained. Please upgrade to CDKv2.

How it Works

This module uses the CfnStack CDK Construct to import the three CloudFormation stacks referenced by the main Datadog CloudFormation template. By referencing the Datadog-provided templates, you can be confident that the integration works exactly as Datadog intends.

Author

This package is created and maintained by Ben Limmer, a freelance architect and consultant. I love helping businesses of all sizes solve their hardest technology problems. Let's connect if I can be of help!

Contributing

PRs are welcome!

Releasing

To release, merge your PR to main.

Metadata

Release files for cdk-datadog-integration 2.1.5

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for cdk-datadog-integration 2.1.5
File Size Uploaded Provenance
cdk-datadog-integration-2.1.5.tar.gz 53.9 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for cdk-datadog-integration 2.1.5
File Interpreter ABI Platform
cdk_datadog_integration-2.1.5-py3-none-any.whl Python 3 none any Details

Total release size: 105.7 kB

Release files / cdk-datadog-integration-2.1.5.tar.gz

Download URL cdk-datadog-integration-2.1.5.tar.gz
Size 53.9 kB
Tags Source
SHA-256 checksum
How to use checksums
7245b8ea751af9b179d0fbe0b6b6790afdde0715f5d0fa789c146f1701e08dd2
BLAKE2b-256 checksum
How to use checksums
3c5eae625ff478404d126871e2e47674e34188a74807ea68e1b610dffe335eae
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.5

Release files / cdk_datadog_integration-2.1.5-py3-none-any.whl

Download URL cdk_datadog_integration-2.1.5-py3-none-any.whl
Size 51.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
2048172e71f5930b8a592e2b9da2c1c856e27a3c73d71fe06aa424a40e294b42
BLAKE2b-256 checksum
How to use checksums
04397f9ee14901cfba3191bdd216ca73c702fee4b486e4125d41e6c5af8019ca
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.5

Security for cdk-datadog-integration 2.1.5

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page