Skip to content
Page cover
For the complete documentation index, see llms.txt. This page is also available as Markdown.

Integrating with AWS Cost Explorer

Overview

This guide connects AWS Cost Explorer to Drivetrain so your cloud cost and usage data syncs for analysis and reporting. Drivetrain reads it through a read-only IAM role in your account; you don't share any access keys.

Prerequisites

To connect AWS Cost Explorer to Drivetrain, you need:

  • An AWS account with Cost Explorer enabled. You enable it by opening Cost Explorer in the AWS console once; data can take up to a day to appear.

  • IAM permissions to create policies and roles in that account

  • Admin access in Drivetrain

  • The data scope you want to sync (see Data scope to confirm)

AWS Cost Explorer is a global service, so no AWS Region is required.

Step 1: Create an IAM policy

Create the policy in the AWS IAM console with this JSON configuration. ce:GetCostAndUsage is the only Cost Explorer call Drivetrain makes:

{
    "Version": "2012-10-17",
    "Statement": [
        {
            "Effect": "Allow",
            "Action": [
                "ce:GetCostAndUsage"
            ],
            "Resource": "*"
        }
    ]
}

Name the policy Drivetrain-CostExplorer-Access.

Step 2: Create an IAM role

  1. Go to Roles and select Create role.

  2. Choose AWS account > Another AWS account and enter Drivetrain's Account ID: 865992467666. Optionally select Require external ID and enter an external ID of your choice.

  3. Select the Drivetrain-CostExplorer-Access policy.

  4. Name the role Drivetrain-Integration and create it.

You can narrow the role's trust policy to Drivetrain's integration role:

Step 3: Connect in Drivetrain

  1. Go to Data in the left navigation, click the + button and select AWS Cost Explorer.

  2. Click Request access and enter the details below. If the form has no field for one, click Add field and enter a Field name and Value:

    • the Role ARN (for example arn:aws:iam::<your-account-id>:role/Drivetrain-Integration)

    • the external ID, if you set one

    • the data scope below

  3. Click Submit credentials. Drivetrain then completes the connection for you. If a connection form opens instead, enter the same details there.

Data scope to confirm

Confirm what you would like Drivetrain to pull:

  • Cost metric(s): unblended, blended, amortized, net amortized, or net unblended cost (and usage quantity, if needed)

  • Granularity: daily or monthly

  • Group-by dimensions: e.g. service, linked account, region, usage type, instance type

  • History: how far back to backfill (e.g. last 12 or 24 months)

Last updated

Was this helpful?