Installing Datadog AWS Integration using AWS Cloud Development Kit (CDK)
I’m a proponent of Infrastructure as Code. The traceability of mutations to your infrastructure is reviewed and documented alongside the rest of your application code. For Amazon Web Services (AWS) customers, AWS Cloud Development Kit (AWS CDK) is one of the best Infrastructure as Code tools out there.
Datadog is a comprehensive all-in-one observability tool, with features like infrastructure monitoring, log aggregation and indexing, APM, and more. A key component to install is their AWS Integration, which creates:
- An IAM policy to create a Trust Relationship between your AWS account and the Datadog AWS account.
- A Forwarding Lambda used to scrape CloudWatch metrics and logs.
The documentation links to a single-click installation method; however, we’d prefer to keep our infrastructure in code with AWS CDK.
To help with this problem, I created an open-source CDK construct, cdk-datadog-integration. Install this package via NPM, pypi, NuGet or Maven, configure it with your Datadog account information and quickly get focused on your implementation.
Under the hood, cdk-datadog-integration uses the CfnStack construct to reference the Datadog-provided CloudFormation templates. This method allows for easy, automatic upgrades to your configuration as Datadog improves their AWS Integration.
Are you interested in improving your company’s observability with a tool like Datadog? Let’s connect! I’d love to help.