CUR 2.0 in AWS Data Exports: the bucket, the export from the CLI, the SQL query, and where the files land
The short answer: CUR 2.0 is not created on the old Cost and Usage Reports screen but in AWS Data Exports, as a "Standard data export" on the COST_AND_USAGE_REPORT table. You can do it from the console (Billing and Cost Management → Data Exports → Create export) or with aws bcm-data-exports create-export, and the API has a single endpoint, in us-east-1 (bcm-data-exports.us-east-1.api.aws, per the Billing endpoints list). Before you create it, the S3 bucket has to let the bcm-data-exports.amazonaws.com service write to it. If what you want is what CUR is and how it compares with the Azure and OCI exports, that lives in the glossary; this note is the step by step.
What changes against legacy CUR
The migration page sums it up in a table. What you notice most when you read the files:
- Fixed schema. Legacy CUR added or dropped columns depending on the services you used, your cost categories and your tags; CUR 2.0 has a fixed set of columns, so an Athena query does not break the month someone activates a new tag.
- Nested columns.
resource_tags,cost_category,productanddiscountare key-value maps. In legacy they were separate columns, such asresource_tags_user_creator. In the export query you read them with a dot:product.from_location. - snake_case names:
line_item_usage_amount,line_item_unblended_cost. A query written for the legacy CSV (lineItem/UnblendedCost) has to be rewritten. - Columns legacy does not have. The migration page names
bill_payer_account_name,line_item_usage_account_name,line_item_iam_principalandline_item_user_identifier. With account names in the file, you no longer need to join the ID against AWS Organizations to know whose line it is. - SQL in the export itself: pick columns, filter rows and rename, before the file reaches S3. In legacy that was built afterwards, in Athena or QuickSight.
A warning about line_item_iam_principal: it is not a "who created this" column. According to the table dictionary, it only shows up with the INCLUDE_IAM_PRINCIPAL_DATA configuration, carries the ARN of the principal that made Amazon Bedrock inference calls, and has data starting April 8, 2026. To find out who created an instance or a bucket you still need CloudTrail, as the note on who created a resource explains.
Step 1: the bucket policy
The bucket guide gives the policy every destination bucket needs, whether it is in your account or in another one. It lets the service do s3:PutObject and nothing else: no permission to read or delete what it delivered. The source ARN carries us-east-1 even when the bucket lives in another Region:
{
"Version": "2012-10-17",
"Statement": [{
"Sid": "EnableAWSDataExportsToWriteToS3",
"Effect": "Allow",
"Principal": { "Service": ["bcm-data-exports.amazonaws.com"] },
"Action": ["s3:PutObject"],
"Resource": "arn:aws:s3:::<bucket>/*",
"Condition": {
"ArnLike": { "aws:SourceArn": "arn:aws:bcm-data-exports:us-east-1:<account-id>:export/*" },
"StringEquals": { "aws:SourceAccount": "<account-id>" }
}
}]
}
Two things from that same page. If you pick an existing bucket from the console, Data Exports replaces its policy with one that lets both CUR and Data Exports deliver: if the bucket had other statements, review them afterwards. And if the policy is edited later or the bucket owner changes, deliveries can stop arriving; the console shows it as "Invalid bucket".
Step 2: the export from the CLI
From the CLI, the export is a JSON document with four parts: the query, the table configurations, the destination and the cadence. This example sets up a daily CUR 2.0 with resource IDs, in Parquet, overwriting the previous delivery of the same month:
cat > cur2.json <<'EOF'
{
"Name": "cur2-daily",
"DataQuery": {
"QueryStatement": "SELECT line_item_usage_start_date, line_item_usage_account_id, line_item_usage_account_name, line_item_product_code, line_item_resource_id, line_item_line_item_type, line_item_unblended_cost, line_item_net_unblended_cost, product_region_code FROM COST_AND_USAGE_REPORT",
"TableConfigurations": {
"COST_AND_USAGE_REPORT": {
"TIME_GRANULARITY": "DAILY",
"INCLUDE_RESOURCES": "TRUE",
"INCLUDE_SPLIT_COST_ALLOCATION_DATA": "FALSE"
}
}
},
"DestinationConfigurations": {
"S3Destination": {
"S3Bucket": "<bucket>",
"S3Prefix": "cur2",
"S3Region": "<bucket-region>",
"S3OutputConfigurations": {
"OutputType": "CUSTOM",
"Format": "PARQUET",
"Compression": "PARQUET",
"Overwrite": "OVERWRITE_REPORT"
}
}
},
"RefreshCadence": { "Frequency": "SYNCHRONOUS" }
}
EOF
aws bcm-data-exports create-export --region us-east-1 --export file://cur2.json
What is worth knowing before you run it, from the query page and the create-export reference:
- The query can be changed later; the table and the table configurations cannot. If tomorrow you want hourly granularity or split cost allocation data, that is a new export.
- The SQL is limited: one SELECT, one FROM, WHERE with
=,!=,<,>,IN,AND,OR,NOT, and LIMIT. There are no aggregations, which is why the Well-Architected CUR Query Library queries do not work in that field; they work later, in Athena. - Column and table names are case-sensitive; keywords are not. Strings go in single quotes:
WHERE line_item_line_item_type = 'Usage'. - An alias (
AS) only accepts letters, digits and underscores. It lets a nested column come out under the name it had in legacy:product.from_location AS product_from_location. - The query can be up to 36,000 characters, and the export name up to 128, with letters, digits, hyphens and underscores.
INCLUDE_RESOURCESaddsline_item_resource_idand one line per resource. It is what makes CUR useful for finding the disk or the IP that is billing you, and also what grows the file the most.SYNCHRONOUSis the only cadence value: the export refreshes every time the source data is updated.
About that cadence, the documentation uses three different phrases: the console says "Daily - export is refreshed up to one time per day", the delivery page says that for CUR 2.0 "this occurs at least once a day", and the API reference says "up to three times daily". The safe call is to plan for one refresh per day and not promise anyone last-hour data.
Step 3: where the files land and how to tell it failed
According to the delivery page, with OVERWRITE_REPORT each month's data sits in s3://<bucket>/cur2/cur2-daily/data/BILLING_PERIOD=2026-11/, in files cur2-daily-00001.snappy.parquet, -00002, and so on. The Manifest.json goes to metadata/BILLING_PERIOD=2026-11/ and is only written once every data file has arrived: if a process reads the bucket, have it wait for the manifest. With CREATE_NEW_REPORT each refresh lands in its own folder named with a timestamp and execution ID, and the bucket grows with every delivery.
The current month keeps refreshing until it closes. After it closes, AWS may update that month again during the following two weeks, so a total you closed on the 1st can still move. To see whether a delivery failed you do not have to wait for the bucket:
aws bcm-data-exports list-exports --region us-east-1
aws bcm-data-exports list-executions --region us-east-1 \
--export-arn <export-arn> \
--query 'Executions[].[ExecutionStatus.StatusCode,ExecutionStatus.StatusReason,CreatedAt]' \
--output table
The list-executions reference lists the possible states, from QUERY_QUEUED to DELIVERY_SUCCESS or DELIVERY_FAILURE, and the failure reasons: INSUFFICIENT_PERMISSION, BILL_OWNER_CHANGED, INTERNAL_FAILURE and DEPRECATED. The first one is the typical step 1 policy problem.
Months before the export was created do not arrive on their own. The troubleshooting page says a backfill is requested through a support case, with the report name and the billing period, and that it cannot be requested for dates before the account was created or under an AWS Organizations structure different from the current one.
Step 4: reading it in Athena
If you pick the Athena integration when creating the export in the console, AWS sets Parquet and overwrite, and drops into the bucket a CloudFormation template (cur2/cur2-daily/crawler-cfn.yml) that creates the Glue crawler, plus a create-table.sql per month to create the table by hand. If you create it by hand, each new month is added with ALTER TABLE ... ADD PARTITION (billing_period='YYYY-MM') LOCATION 's3://<bucket>/cur2/cur2-daily/data/BILLING_PERIOD=YYYY-MM/'. With the table in place, aggregations do work:
SELECT line_item_usage_account_name,
line_item_product_code,
ROUND(SUM(line_item_net_unblended_cost), 2) AS cost
FROM <database>.<table>
WHERE billing_period = '2026-11'
GROUP BY 1, 2
ORDER BY cost DESC
LIMIT 20;
I used line_item_net_unblended_cost instead of line_item_unblended_cost on purpose: unblended does not subtract credits or discounts, so an account living on promotional credits shows up spending money it does not pay. If your organization shares a NAT gateway across accounts, split cost allocation data is what distributes that cost by account; it is in the note on who pays for a shared NAT.
Management account or member account
CUR 2.0 inherits AWS Organizations consolidated billing. Created from the management account, it carries the lines of that account and of every member account; created from a member account, only that account's lines, and only since it joined its current organization. If a team builds its own export from its account and the numbers do not match finance, the first thing to check is which account each one was created from.
What Control Cloud does with this
Control Cloud does not read CUR or create exports. It reads real AWS spend from Cost Explorer (GetCostAndUsage, monthly, grouped by service and Region) with a read-only credential that needs ce:GetCostAndUsage, and shows it next to the account inventory. Each Cost Explorer query costs about USD 0.01, so it only runs when you ask for it and never refreshes on its own. For per-resource, per-hour detail, the CUR 2.0 in this note is the right source. If you want to see the account on a map, you can request access; the Solo plan is free and the Team plan has a 7-day trial.
Have you already moved from legacy CUR to 2.0? What broke along the way: the column names, the nested tags, or a query that depended on a column that is no longer there?
About the author
- DevOps & Cloud Engineer. Building Control Cloud: one console to see, validate and operate your multi-cloud infrastructure. https://controlcloud.dev
Comments
Join the discussionNo comments yet. Be the first to comment.