Setting Up the Datadog AWS Integration - Where Roles and Collection Scope Trip You Up

This article sorts out the practical differences between the three paths for connecting an AWS account to Datadog (CloudFormation / Terraform / manual role delegation), where the external ID and trust policy trip people up, how long it takes for metrics to arrive, and why logs alone take a separate route. The three upfront decisions are left to the existing explanations; the focus here is on the moments where your hands stop.

Three paths, and the criterion is "who fixes it later"

The three decisions you make first in an AWS integration (role / collection scope / regions) and how hosts picked up through the integration are counted are left to the Integrations explanation. This article covers what comes after that: the points where your hands stop while actually connecting. The onboarding paths listed in the official docs are an automated family (CloudFormation, recommended for getting started quickly; Terraform; Control Tower; and multi-account setup for AWS Organizations) and a manual family in which you create the IAM role yourself (as of September 2026; source: Amazon Web Services (Integration)). The table below compares the three main paths whose practical steps differ.

The three main AWS integration paths and how their practical steps differ
PathWhat gets createdSuited toWhen fixing later
CloudFormationAn IAM role and policy for Datadog. Three stacks: the main one plus nested onesConnecting one account quickly. Values chosen on screen are filled into the templateThe template only handles creation and deletion. Updates follow the AWS procedure
TerraformThe same role and integration settings, as codeConnecting multiple accounts at once. You already manage AWS with TerraformEdit the code and apply
Manual (role delegation)An IAM role you create yourself + an inline policyYou want to check the policy contents line by line. You are not allowed to use CloudFormationRe-pasting the policy is also manual
Sources: Getting Started with AWS (Setup), Amazon Web Services (Integration) (Setup / Automatic / Manual), and AWS Manual Setup Guide

The criterion for choosing is not the initial effort but the fact that the official docs explicitly state that the permissions in the integration policy may change as new AWS services are added. In other words, there will be occasions to fix things even after you have connected once, so pick the path that settles "who fixes it later, and how."

What the external ID and the trust policy prevent

The core of the manual path is "role delegation": letting Datadog's AWS account assume a role in your own account. The procedure runs through six steps following the official guide (as of September 2026; source: AWS Manual Setup Guide).

  • 1. On the Datadog AWS integration page, choose Add AWS Account(s) → Manually and pick the partition (aws / aws-cn / aws-us-gov)
  • 2. Choose Role Delegation as the access type and note the displayed AWS External ID (it is regenerated after 48 hours if unused)
  • 3. In the AWS IAM console, create a role with the trusted entity set to "Another AWS account" and enter Datadog's account ID (the ID differs by Datadog site)
  • 4. Enable Require external ID and enter the ID you noted. Leave Require MFA disabled
  • 5. Paste the integration permissions as an inline policy (example name = DatadogIntegrationPolicy)
  • 6. Back in Datadog, enter the account ID without hyphens and the role name (case-sensitive) and save
Source: AWS Manual Setup Guide (Generate an external ID / Create a Datadog integration IAM role / Complete the setup in Datadog)

The external ID is a mechanism AWS provides for letting a third party assume a role; it adds a condition to the trust policy that says "only a party presenting this ID." Datadog's account ID belongs to Datadog itself and does not change per customer, so without an external ID there would be no way to tell the difference when another customer mistakenly specifies your role name. Its job is to add a single passphrase that structurally prevents that mix-up.

How long metrics take to arrive, and where to look when they do not

Seeing nothing right after connecting is normal. The official docs explain that metrics appear in about 10 minutes with API polling, or 2 to 3 minutes with CloudWatch Metric Streams, and that because each service reports on a different cycle, dashboards are only partially filled during the first hour (as of September 2026; source: Getting Started with AWS). AWS-side tags take 15 minutes to several hours, resources arrive on the next crawl cycle, and logs are a separate configuration.

Order of checks when data "does not arrive" right after connecting (within the scope of the official troubleshooting)
SymptomCauseWhere to check
The UI returns an error on saveDatadog cannot assume the roleWhether the account ID in the trust policy is the value for your Datadog site
Same as aboveExternal ID mismatchThe External ID currently shown on the integration page versus the value in the trust policy. If unused for 48 hours, it has already been regenerated
Same as aboveRole name mismatchWhether the ARN and the entered value match down to the case
Only some services are missing after 10 minutes have passedThat service's reporting cycle, or it is disabled under Metric CollectionWait for the first hour. The list of targets on the Metric Collection tab
Settings disappeared after changing the access typeChanging the type is a delete + re-add, and account-level settings do not carry overNote down filters and the like before switching
Sources: AWS Manual Setup Guide (Troubleshoot IAM role issues / Setup) and Getting Started with AWS (What to expect after setup)

The top three are known on the spot, because on save Datadog performs a check in which it "tries to assume the role from its own AWS account." The one that is not obvious is the fourth, and to decide whether to wait or to fix, use the two official numbers, 10 minutes and 1 hour, as your yardstick.

Collection scope and regions can be narrowed later

What comes into play after connecting are the Metric Collection tab and the General tab on the integration page (as of September 2026; source: Getting Started with AWS). Under Metric Collection you decide, per service, which AWS services to collect metrics from, and you can additionally choose one Include / Exclude filter on metric names per namespace. Patterns are written with lowercase letters, digits, and ._*; when you specify something like aws.ec2.network_*, the number of matching metrics is shown in a table before you save. On the General tab you choose the regions from which metrics / CloudWatch events / resources are collected, and values from regions you have not selected will not arrive.

  • 1. General tab - select the target regions (unselected regions go silently missing)
  • 2. Metric Collection tab - decide per service whether to collect
  • 3. Include / Exclude filter per namespace - narrow down to just the metric names you need
  • 4. Know that the two required metrics (aws.ec2.cpuutilization / aws.lambda.invocations) cannot be excluded
Source: Getting Started with AWS (Configuration / Filter metrics by metric name / Add regions)

How this narrowing affects billing, and how EC2 instances picked up through the integration and hosts with the Agent installed are counted, are left to the Integrations explanation and the article on checking usage.

Why logs alone take a separate route - Forwarder and Data Firehose

Metrics arrive along a route in which Datadog assumes the role and fetches from CloudWatch, but logs do not come along this route. The official docs list two ways to send logs from AWS services (as of September 2026; source: Getting Started with AWS). One is Amazon Data Firehose delivery to Datadog, recommended for high-volume CloudWatch Logs. The other is a Lambda function called the Datadog Forwarder, recommended for logs from resources that cannot be streamed directly, such as S3, and required if you send Lambda function traces or enhanced metrics.

The two routes for logs from AWS (official guidance on which to use, as of September 2026)
RouteSuited toDeployment formWhere it trips you up
Amazon Data Firehose deliveryHigh-volume CloudWatch LogsA Firehose delivery streamResources that cannot stream directly to Firehose (such as S3) belong on the Forwarder side
Datadog Forwarder (Lambda)Logs via S3 / SNS / Kinesis, Lambda traces and enhanced metricsA CloudFormation stack (enter DdApiKey and DdSite) → attach triggers to the function with logical ID Forwarderv4.1.0 and later are ARM64 only. For monitoring Lambda itself, the Extension is recommended
Sources: Getting Started with AWS (Send logs) and Datadog Forwarder (Overview / Installation / CloudFormation)

Installing the Forwarder alone does not make logs flow; attaching triggers from log groups or S3 to the function is a separate piece of work. The official recommendation is a design in which monitoring of the Lambda functions themselves is collected by the Lambda Extension rather than the Forwarder, and that difference is left to the Serverless Monitoring explanation.

Multiple accounts and the occasions that require updates

If you have multiple accounts, the official guidance is to connect them in bulk via the API / AWS CLI / Terraform, or, if they are under Organizations, to follow the dedicated guide (as of September 2026; sources: Getting Started with AWS / Amazon Web Services (Integration)). The Forwarder can also be distributed to all accounts with CloudFormation StackSets from the Organizations management account (source: Datadog Forwarder). There are two occasions that require updates. Because the permissions in the integration policy may change as new AWS services are added, the manual path means re-pasting. Because the CloudFormation template only handles creation and deletion, stack updates follow the AWS-side procedure. This is why the path is chosen by "who fixes it later": if you manage it with Terraform, both show up as diffs in code.

What you should see when it has succeeded

Verification happens in two places, the AWS side and the Datadog side. On the AWS side, the CloudFormation stacks, including the three nested ones, should be CREATE_COMPLETE; on the Datadog side, after pressing Ready! on the integration page, metrics should line up on the AWS overview dashboard within 10 minutes (as of September 2026; source: Getting Started with AWS).

  • 1. The main stack and all three nested stacks have finished creating
  • 2. Saving on the integration page produces no error (the role-assumption check passed)
  • 3. Metrics line up on the AWS overview dashboard within 10 minutes
  • 4. EC2 instances without the Agent appear in the Infrastructure Monitoring host list with their AWS-side tags
  • 5. If you configured logs, they can be found in Log Explorer from the source or service facet
Sources: Getting Started with AWS (Setup / Validation) and Amazon Web Services (Integration) (Overview)

Once you have passed step 4, whether to install the Agent on EC2 depends on whether you need information from inside the host, such as processes and logs. Where to draw the line with what CloudWatch alone covers is left to the article on choosing between Datadog and CloudWatch.

References

Share