The billing commands provide management capabilities for AWS billing and Cost and Usage Reports (CUR).
Cost and Usage Reports (CUR) provide detailed information about your AWS costs and usage. These commands help you manage CUR 2.0 reports, which provide enhanced capabilities for cost analysis and optimization.
List all existing Cost and Usage Reports in your AWS account.
aws-cloud-utilities billing cur-list [OPTIONS]
Options:
--output-file: Output file for CUR reports list (supports .json, .yaml, .csv)Examples:
# List all CUR reports
aws-cloud-utilities billing cur-list
# Export list to JSON file
aws-cloud-utilities billing cur-list --output-file cur-reports.json
Show detailed configuration for a specific CUR report.
aws-cloud-utilities billing cur-details REPORT_NAME [OPTIONS]
Arguments:
REPORT_NAME: Name of the CUR report to show details forOptions:
--output-file: Output file for CUR report details (supports .json, .yaml)Examples:
# Show details for a specific report
aws-cloud-utilities billing cur-details my-cur-report
# Export details to file
aws-cloud-utilities billing cur-details my-cur-report --output-file report-details.json
Create a new Cost and Usage Report (CUR 2.0).
aws-cloud-utilities billing cur-create [OPTIONS]
Required Options:
--report-name: Name for the new CUR report--bucket: S3 bucket name for CUR deliveryOptional Options:
--prefix: S3 prefix for CUR files (default: cur-reports)--format: Report format - textORcsv or Parquet (default: textORcsv)--compression: Compression type - GZIP, ZIP, or Parquet (default: GZIP)--schema-elements: Additional schema elements (default: RESOURCES)Examples:
# Create a basic CUR report
aws-cloud-utilities billing cur-create \
--report-name my-cur-report \
--bucket my-cur-bucket
# Create CUR report with custom settings
aws-cloud-utilities billing cur-create \
--report-name detailed-cur-report \
--bucket my-cur-bucket \
--prefix billing/cur-data \
--format Parquet \
--compression Parquet \
--schema-elements RESOURCES
Delete a Cost and Usage Report.
aws-cloud-utilities billing cur-delete REPORT_NAME [OPTIONS]
Arguments:
REPORT_NAME: Name of the CUR report to deleteOptions:
--confirm: Skip confirmation promptExamples:
# Delete a CUR report (with confirmation)
aws-cloud-utilities billing cur-delete my-cur-report
# Delete without confirmation prompt
aws-cloud-utilities billing cur-delete my-cur-report --confirm
Validate S3 bucket permissions for CUR delivery.
aws-cloud-utilities billing cur-validate-bucket BUCKET_NAME [OPTIONS]
Arguments:
BUCKET_NAME: S3 bucket name to validateOptions:
--prefix: S3 prefix for CUR files (optional)Examples:
# Validate bucket permissions
aws-cloud-utilities billing cur-validate-bucket my-cur-bucket
# Validate with specific prefix
aws-cloud-utilities billing cur-validate-bucket my-cur-bucket --prefix cur-data
Cost and Usage Reports (CUR) provide the most comprehensive set of AWS cost and usage data available. These reports include additional metadata about AWS services, pricing, and reservations that can help you better understand your costs.
To create a CUR report, you need an S3 bucket with proper permissions. The bucket policy must allow the AWS billing service to:
The cur-create command will automatically configure the required bucket policy if it doesn’t exist.
cur-create to set up automated cost reportingcur-validate-bucket to ensure proper permissionscur-list to track available reportscur:DescribeReportDefinitionscur:PutReportDefinitioncur:DeleteReportDefinitions3:GetBucketAcls3:GetBucketPolicys3:PutBucketPolicys3:PutObject (for the target S3 bucket)