Datadog-Amazon CloudFormation

AWS CloudFormation gives you templates to describe, configure, and provision all of the AWS resources in your environment at once. The Datadog-AWS CloudFormation Resources allow you to interact with the supported Datadog resources, send resources to any Datadog datacenter, and privately register an extension in any region with Datadog resources.

To access these resources, use the AWS Management Console (UI) or the AWS Command Line Interface (CLI).

AWS Management Console

To get started:

  1. Sign in to the AWS Management Console with your account and navigate to CloudFormation.

  2. Select “Public extensions” from the left hand pane and filter Publisher by “Third Party”.

  3. Use the search bar to filter by the “Datadog” prefix.

Note: All official Datadog resources begin with Datadog:: and specify that they are Published by Datadog.

  1. Select the desired resource name to view more information about its schema, and click Activate.

  2. On the Extension details page, specify:

  • Extension name
  • Execution role ARN
  • Automatic updates for minor version releases
  • Configuration
  1. For the resource configuration, it is strongly recommended to use AWS Secrets Manager or similar service for storing your Datadog API and Application keys instead of clear text.

If using AWS Secrets Manager, you can dynamically reference your API and Application keys in the configuration. For more information, see the AWS documentation.

For example:

{
  "DatadogCredentials": {
      "ApiKey": "{{resolve:secretsmanager:MySecret:SecretString:SecretAPIKey}}",
      "ApplicationKey": "{{resolve:secretsmanager:MySecret:SecretString:SecretAppKey}}"
  }
}

Specify the ApiURL if you are using an account in a region other than US1. For example, use https://api.datadoghq.eu for an account in the EU region or https://api.us5.datadoghq.com/ for an account in the US5 region.

  1. After you have configured your resource, create your AWS stack that includes any of the activated Datadog resources.

For more information about available commands and workflows, see the official AWS documentation.

AWS Command Line Interface

To get started:

  1. Create an execution role for the CloudFormation resource based on the file <RESOURCE_DIR>/resource-role.yaml

  2. In your terminal, use the aws-cli tool to register a Datadog resource:

    aws cloudformation register-type \
        --region "<REGION>" \
        --type RESOURCE \
        --type-name "<DATADOG_RESOURCE_NAME>" \
        --schema-handler-package "<LINK_TO_S3>" \
        --execution-role-arn "<ROLE_ARN_FROM_STEP_1>"
    
  3. View the version of the newly registered resource by running the following in your terminal:

    aws cloudformation list-type-versions \
    --region "<REGION>" \
    --type RESOURCE \
    --type-name "<DATADOG_RESOURCE_NAME>"
    
  4. Set this newly registered version as the default by running the following in your terminal:

    aws cloudformation set-type-default-version \
        --region "<REGION>" \
        --type RESOURCE \
        --version-id <VERSION_ID> \
        --type-name "<DATADOG_RESOURCE_NAME>"
    

    With the following required placeholders:

    • <REGION>: Your AWS region.
    • <DATADOG_RESOURCE_NAME>: The name of the resource to register, refer to the table below to see the Datadog supported resources.
    • <LINK_TO_S3>: S3 link to the resource.
      • S3 link: s3://datadog-cloudformation-resources/<RESOURCE_FOLDER>/<RESOURCE_FOLDER>-<RESOURCE_VERSION>.zip
      • See the Resources Available section, which links to examples of the latest supported S3 links.
    • VERSION_ID: The underlying version of the resource as returned by the command in step 2.
  5. Set the newly registered resource configuration by running the following in your terminal:

    aws cloudformation set-type-configuration \
        --type-name "<DATADOG_RESOURCE_NAME>" \
        --type RESOURCE \
        --configuration '{"DatadogCredentials": {"ApiKey": "{{resolve:secretsmanager:MySecret:SecretString:SecretAPIKey}}", "ApplicationKey": "{{resolve:secretsmanager:MySecret:SecretString:SecretAppKey}}"}}'
    
  6. In your AWS account, create your AWS stack that includes any of the registered Datadog resources.

For more information about available commands and workflows, see the official AWS documentation.

Resources available

The following Datadog resources can be registered within your AWS account. Refer to their specific documentation to see how to configure them:

ResourceNameDescriptionFolderS3 Package Links
DashboardDatadog::Dashboards::DashboardCreate, update, and delete Datadog dashboardsdatadog-dashboards-dashboardSchema Handler Versions
Datadog-AWS integrationDatadog::Integrations::AWSManage your Datadog-Amazon Web Service integrationdatadog-integrations-awsSchema Handler Versions
MonitorDatadog::Monitors::MonitorCreate, update, and delete Datadog monitorsdatadog-monitors-monitorSchema Handler Versions
Downtime (Deprecated)Datadog::Monitors::DowntimeEnable or disable downtimes for your monitorsdatadog-monitors-downtimeSchema Handler Versions
Downtime ScheduleDatadog::Monitors::DowntimeScheduleSchedule Datadog downtimesdatadog-monitors-downtimescheduleSchema Handler Versions
UserDatadog::IAM::UserCreate and manage Datadog usersdatadog-iam-userSchema Handler Versions
SLODatadog::SLOs::SLOCreate and manage Datadog SLOsdatadog-slos-sloSchema Handler Versions

Supported regions

The Datadog-Amazon CloudFormation resources are available on the CloudFormation Public Registry in the following regions:

CodeName
us-east-1US East (N. Virginia)
us-east-2US East (Ohio)
us-west-1US West (N. California)
us-west-2US West (Oregon)
ap-south-1Asia Pacific (Mumbai)
ap-northeast-1Asia Pacific (Tokyo)
ap-northeast-2Asia Pacific (Seoul)
ap-southeast-1Asia Pacific (Singapore)
ap-southeast-2Asia Pacific (Sydney)
ca-central-1Canada (Central)
eu-central-1Europe (Frankfurt)
eu-west-1Europe (Ireland)
eu-west-2Europe (London)
eu-west-3Europe (Paris)
eu-north-1Europe (Stockholm)
sa-east-1South America (São Paulo)

Note: To privately register a resource in any other region, use the provided packages.

Troubleshooting

Need help? Contact Datadog support.