Skip to content

Billing Commands

Manage Cost and Usage Reports (CUR 2.0) - the hourly, resource-level billing export that most cost tooling is built on.

If you have no CUR at all, start with cur-setup: it creates the S3 bucket, applies the delivery bucket policy, sets a lifecycle rule, and registers the report in one step. The individual cur-create / cur-validate-bucket commands exist for when you need to manage those pieces separately.

Commands

billing cur-create

Create a new Cost and Usage Report (CUR 2.0).

aws-cloud-utilities billing cur-create [OPTIONS]
Option Value Description
--report-name TEXT Required. Name for the new CUR report
--bucket TEXT Required. S3 bucket name for CUR delivery
--prefix TEXT S3 prefix for CUR files (default: cur-reports)
--format textORcsv | Parquet Report format (default: textORcsv)
--compression GZIP | ZIP | Parquet Compression type (default: GZIP)
--schema-elements TEXT Additional schema elements (default: RESOURCES) (repeatable)

billing cur-delete

Delete a Cost and Usage Report.

aws-cloud-utilities billing cur-delete REPORT_NAME [OPTIONS]
Option Value Description
--confirm flag Skip confirmation prompt

billing cur-details

Show detailed configuration for a specific CUR report.

aws-cloud-utilities billing cur-details REPORT_NAME [OPTIONS]
Option Value Description
--output-file TEXT Output file for CUR report details (supports .json, .yaml)

billing cur-list

List all existing Cost and Usage Reports.

aws-cloud-utilities billing cur-list [OPTIONS]
Option Value Description
--output-file TEXT Output file for CUR reports list (supports .json, .yaml, .csv)

billing cur-setup

Provision an end-to-end CUR data source (bucket, policy, and report).

aws-cloud-utilities billing cur-setup [OPTIONS]
Option Value Description
--bucket TEXT Required. S3 bucket name for CUR delivery
--report-name TEXT Name for the CUR report (default: hourly-cur)
--prefix TEXT S3 prefix for CUR files (default: cur)
--time-unit HOURLY | DAILY CUR time granularity (default: HOURLY)
--retention-days INTEGER Days before CUR objects are expired by the bucket lifecycle policy (default: 365)
--region TEXT Region for the S3 bucket (defaults to the session region)
--enable-versioning flag Enable S3 bucket versioning
--dry-run flag Print the plan without creating anything

billing cur-validate-bucket

Validate S3 bucket permissions for CUR delivery.

aws-cloud-utilities billing cur-validate-bucket BUCKET_NAME [OPTIONS]
Option Value Description
--prefix TEXT S3 prefix for CUR files (optional)

Examples

# What CUR reports already exist
aws-cloud-utilities billing cur-list

# Provision a complete CUR data source, dry run first
aws-cloud-utilities billing cur-setup --bucket my-cur-bucket --dry-run
aws-cloud-utilities billing cur-setup --bucket my-cur-bucket --time-unit HOURLY --retention-days 365

# Confirm a bucket will accept CUR delivery before creating the report
aws-cloud-utilities billing cur-validate-bucket my-cur-bucket --prefix cur

# Register a report against an existing bucket
aws-cloud-utilities billing cur-create \
    --report-name hourly-cur \
    --bucket my-cur-bucket \
    --prefix cur-reports \
    --format Parquet \
    --compression Parquet

# Inspect one report's configuration
aws-cloud-utilities billing cur-details hourly-cur --output-file cur-config.json

# Remove a report
aws-cloud-utilities billing cur-delete old-report --confirm

Notes

CUR is a us-east-1 global service. Run these commands against us-east-1 regardless of where the delivery bucket lives, and note that a newly created report can take up to 24 hours before the first file lands in S3.

cur-setup --dry-run prints the bucket, policy, lifecycle rule, and report definition it would create without touching anything. Use it first.