Skip to main content

Set-up documentation AWS x Costory

Integrating AWS data – Onboarding Guide

Grégoire Blond avatar
Written by Grégoire Blond
Updated over a month ago

What You'll Need to Provide in Costory

  • Role ARN (federated identity)

  • S3 Bucket name

  • Prefix (path to CUR 2.0 data)


Step 0: Prepare Your AWS Account (EKS/ECS Users)

Skip this step if you don't use EKS or ECS.

0.1 Enable Split Cost Allocation Data

  1. Under Split cost allocation data, enable EKS and/or ECS

  2. Select Based on resource_request

0.2 Activate Cost Allocation Tags

  1. Activate all tags you want Costory to analyze (now and in the future)

  2. For EKS/ECS splitting: ensure all aws:eks:* and aws:ecs:* tags are enabled

Important: Tags not activated won't appear in your CUR 2.0 data. This cannot be fixed retroactively.


Step 1: Choose Your Setup Method

Option A: CloudFormation Template (Recommended)

One-click setup that creates everything automatically.

  1. Set your region to US East (N. Virginia) - click the region selector in the top-right corner

  2. Open the CloudFormation template: Launch Stack

  3. Click Create stack and follow the prompts

  4. Once complete, go to the Outputs tab and save:

    • Bucket Name

    • Role ARN

    • Prefix

What the template creates:

  • S3 bucket for CUR exports

  • CUR 2.0 Data Export (Parquet format)

  • IAM role with read-only access for Costory


Option B: Manual Setup

Step 1a: Create the Data Export

  1. Go to Data Exports (must use parent billing account)

  2. Click Create → Select Standard Data Export

  3. Configure the export:

    • Name: e.g., yourcompany-data-export

    • Format: CUR 2.0

    • Include: Resource IDs, Split cost allocation data

    • Granularity: HOURLY (for EKS splitting) or DAILY (otherwise)

    • Compression: Parquet

    • Overwrite: Enable "Override existing data export file"

  4. Create or select an S3 bucket (e.g., costory-exports)

  5. Set a prefix (do NOT include trailing / - AWS adds it automatically)

  6. Click Review and Complete

Note: First export takes up to 12 hours.

Step 1b: Create IAM Policy

  1. Go to IAM PoliciesCreate policyJSON

  2. Paste this policy (replace <YOUR_BUCKET_NAME>):

{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": ["s3:ListBucket", "s3:GetObject"],
"Resource": [
"arn:aws:s3:::<YOUR_BUCKET_NAME>",
"arn:aws:s3:::<YOUR_BUCKET_NAME>/*"
]
}
]
}
  1. Name it Costory-read-s3 and create

Step 1c: Create IAM Role

  1. Go to IAM RolesCreate roleCustom trust policy

  2. Paste this trust policy:

{   
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Principal": {
"Federated": "accounts.google.com"
},
"Action": "sts:AssumeRoleWithWebIdentity",
"Condition": {
"StringEquals": {
"accounts.google.com:sub": [
"110566759229541603476",
"107654210203154458570"
]
}
}
}
]
}
  1. Click Next, search for and attach Costory-read-s3

  2. Name the role costory-trust-link

  3. Copy the Role ARN from the role summary


Step 2: Request a Backfill

AWS only exports the current month by default. Choose your backfill approach:

For up to 12 months (self-service)

  1. Select AWS-generated cost allocation tags tab

  2. Find and activate aws:createdBy

  3. Wait for status to change to Active

  4. Select aws:createdBy again → Click Backfill tags

  5. Choose your backfill start date (up to 12 months)

For more than 12 months

Submit an AWS Support request:

Hi AWS Support,  Please backfill our AWS Cost and Usage Report (CUR 2.0) named <CUR_NAME> with the last 36 months of billing data for account ID [Your AWS Account ID].  Let me know if anything is needed from our end to proceed.  Thanks

Step 3: Configure in Costory

Wait until you see data in your S3 bucket (up to 12 hours after creating the export).

  1. Go to CostoryDatasourcesBilling

  2. Click Import New Billing Datasource → Select AWS

  3. Enter:

    • Bucket Name

    • Role ARN

    • Prefix (must end with /)

    • EKS Split Data: Enable if using EKS

    • Start/End Date: Only if requested by Costory Support

  4. Click Next to validate, then Import

Data will be available the next day.


FAQ

What format should the CUR 2.0 file be in?

Parquet format is required for optimal processing and analytics performance.

Does the CUR need to be in the master payer account?

No, but it must include complete billing data for the master payer.

Can the CUR file overwrite itself during the month?

Yes, this is expected and ensures up-to-date data.

How long until data appears in Costory?

First fetch takes about 48 hours. Check the next morning (around 10 AM local time).

Did this answer your question?