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)
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
Go to Roles and select Create role.
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.Select the Drivetrain-CostExplorer-Access policy.
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
Go to Data in the left navigation, click the + button and select AWS Cost Explorer.
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
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?
