Overview
The AWS Billing Collector retrieves billing and cost data from Amazon Web Services (AWS) Cost and Usage Report exports stored in an Amazon S3 bucket.
This collector provides visibility into AWS service consumption, costs, and resource-level charges across all linked accounts, enabling organizations to validate cloud spending, allocate costs, and reconcile usage within Varibill.
The collector retrieves rated cost data, meaning monetary values (costs and totals) are supplied by AWS and submitted directly to Varibill. Pricing markups can be applied within Varibill without requiring separate price lists.
This is a historically capable collector, meaning each execution retrieves billing data for an entire billing period based on the Cost and Usage Report exports available in the configured S3 bucket.
For general instructions on creating and running Source Collectors, see: Configuring a New Cloud Source Collector
Collector Summary
| Field | Value |
|---|---|
| Source Collector Name | Amazon AWS S3 Billing File - Version 7.4 |
| Collection Behavior | Historically Capable |
| Rating Model | Rated |
| Vendor Name | Amazon Web Services (AWS) |
| Product | AWS Cost and Usage Reports / Amazon S3 |
| Purpose | Retrieves billing and cost data from AWS Cost and Usage Report exports for cost allocation and validation within Varibill |
About Amazon Web Services
Amazon Web Services (AWS) is a cloud computing platform operated by Amazon that provides on-demand infrastructure services including compute, storage, networking, databases, analytics, machine learning, and security.
AWS Cost and Usage Reports (CUR) provide detailed billing data for all AWS services consumed across an organization’s accounts. These reports are exported as compressed CSV files to an Amazon S3 bucket at configurable intervals, and include line-item-level detail covering usage quantities, costs, pricing, resource identifiers, and account attribution.
Organizations use Cost and Usage Reports to understand their AWS spending at a granular level, track costs by service, region, and resource, and integrate billing data with external financial and billing systems.
Note: For information on setting up AWS Cost and Usage Reports, refer to the AWS Cost and Usage Reports documentation.
Data Collected
The Amazon AWS S3 Billing File - Version 7.4 collector retrieves rated billing data from AWS Cost and Usage Report exports stored in an S3 bucket. Each record represents an aggregated billing line item covering a specific service, operation, and pricing unit for a given account and billing period.
The collector processes the following data from each Cost and Usage Report export:
- Cost values — net unblended cost and unblended cost for each line item, as calculated by AWS
- Usage quantities — the amount consumed for each service and pricing unit
- Service and resource details — the AWS product code, operation type, pricing unit, resource identifier, and line item description
- Account attribution — the AWS usage account ID and account name, used to identify the billing entity
The collector applies the following filtering during processing:
- Tax line items are always excluded
- Distributor Discount line items are excluded unless
the Include Discounts parameter is set to
true - Refund line items are excluded unless the
Include Refunds parameter is set to
true
After filtering, records are aggregated by account, billing period, product, and resource description before submission to Varibill.
Note: The collector downloads Cost Export files from S3 as compressed archives (.gz), extracts the CSV data, processes it, and then deletes the source files from S3 after successful download. Processed CSV files are archived locally after submission.
Prerequisites
Before configuring this collector, ensure that:
- You have an AWS account with access to Amazon S3
- You have configured an AWS Cost and Usage Report to export data to an S3 bucket
- You have created an AWS IAM user or access key with permissions to list, read, and delete objects in the S3 bucket containing the Cost Export data
- You have noted the S3 bucket name and the key prefix (folder path) where the Cost Export data files are stored
- You have access to the Varibill Source Collector configuration screen
Tip: The S3 bucket key is the folder path within the bucket where
your Cost Export data files are located. For example, if your cost
export is configured to write to
varibill/Varibill-Cost-Export/data within a bucket named
varibill-cost-export, the bucket name is
varibill-cost-export and the bucket key is
varibill/Varibill-Cost-Export/data.
Warning! The AWS Access Key and Secret Key grant access to your S3 bucket. Store these credentials securely and do not share them. If the credentials are compromised, revoke and regenerate them immediately in the AWS IAM console. The Secret Key is masked in the Varibill UI once saved.
Configuration Parameters
The parameters below are entered when configuring the collector in Varibill. They are grouped by function.
Connection Parameters
These parameters identify and authenticate against your AWS S3 bucket containing the Cost Export data.
| Parameter | What it is | Where to find it |
|---|---|---|
| AWS Access Key | The access key ID for the IAM user or role used to connect to S3 | AWS Console → IAM → Users → Your user → Security credentials → Access keys |
| AWS Secret Key | The secret access key paired with the AWS Access Key | Displayed only once when the access key is created in the AWS IAM console. Record it securely at creation time. |
| AWS Bucket Name | The name of the S3 bucket containing your Cost and Usage Report exports | AWS Console → S3 → Your bucket name |
| AWS Bucket Key | The key prefix (folder path) within the S3 bucket where the Cost Export data files are stored | The export path configured in your AWS Cost and Usage Report settings |
Warning! The AWS Secret Key is displayed only once when the access key is created. If you lose it, you must create a new access key pair in the AWS IAM console.
Billing Parameters
These parameters control which line item types are included in or excluded from the collection.
| Parameter | What it is | Default |
|---|---|---|
| Include Discounts | When set to true, distributor discount line items from
the AWS Cost Export are included in the data submitted to Varibill. When
set to false, discount line items are excluded. |
true |
| Include Refunds | When set to true, refund line items from the AWS Cost
Export are included in the data submitted to Varibill. When set to
false, refund line items are excluded. |
true |
Note: Tax line items are always excluded from the data submitted to Varibill, regardless of these settings.
Note: Product Identifiers submitted to Varibill are constructed in
the format {product code}#{operation}#{pricing unit} — for
example, AmazonEC2#PublicIP-In#GB or
AmazonCloudWatch#HourlyStorageMetering#GB-Mo. Client
Identifiers are constructed in the format
{usage account ID}#{billing entity}#{line item type} — for
example, 338668895106#AWS#Usage. Ensure your Varibill
product configuration accounts for these formats.
Operational Parameters
These parameters control file management behavior.
| Parameter | What it is | Default |
|---|---|---|
| Delete data files older than | The number of days after which locally stored collection files are automatically deleted | 62 |
| Maximum number of records per file | The maximum number of records written to a single output file before a new file is started | 10000 |
AWS References
The following resources may assist with configuring your AWS Cost and Usage Report or locating your S3 bucket credentials.
AWS Documentation (External)
Note: AWS documentation is provided for reference. Steps and interface labels may vary depending on your AWS account configuration and permissions.
Configuration Steps
Step 1: Prepare Your AWS Environment
- Log in to the AWS Management Console.
- Confirm that you have an AWS Cost and Usage Report configured to export data to an S3 bucket. If not, create one in the AWS Billing and Cost Management console.
- Note the S3 bucket name and key prefix (folder path) where the Cost Export files are stored.
- Navigate to IAM and create or identify an access key with permissions to list, read, and delete objects in the S3 bucket.
- Copy the Access Key ID and Secret Access Key.
Step 2: Configure the Collector in Varibill
In the Varibill User Interface, open the Source Collector configuration screen.
Enter the required field values under the Details tab:
- Hosting Provider: Select Varibill Cloud
- Source Collector Name: Select Amazon AWS S3 Billing File - Version 7.4
Enter the connection parameters:
- AWS Access Key: The access key ID from the AWS IAM console
- AWS Secret Key: The secret access key paired with the access key ID
- AWS Bucket Name: The name of the S3 bucket containing your Cost Export data
- AWS Bucket Key: The key prefix (folder path) within the bucket
Configure the billing parameters:
- Include Discounts: Set to
trueto include distributor discount line items, orfalseto exclude them - Include Refunds: Set to
trueto include refund line items, orfalseto exclude them
- Include Discounts: Set to
Save the collector configuration.
Step 3: Run the Collector
Run or schedule the collector according to your standard Source Collector execution process.
For detailed instructions, see: Configuring a New Cloud Source Collector
Troubleshooting
If the collector fails to connect to AWS S3, verify that:
- The AWS Access Key and AWS Secret Key are correct and the IAM credentials have not been revoked or expired.
- The IAM user or role has the necessary S3 permissions:
s3:ListBucket,s3:GetObject, ands3:DeleteObjecton the target bucket. - The AWS Bucket Name is correct and the bucket exists in the expected AWS region.
- The AWS Bucket Key matches the folder path where the Cost Export files are stored.
- No bucket policy or network restriction is blocking access from the Varibill collector’s IP address.
If the collector connects successfully but returns no data, verify that:
- Your AWS Cost and Usage Report is configured and actively exporting data to the S3 bucket.
- Cost Export files exist at the configured bucket key prefix.
- The Cost Export files are in the expected compressed (.gz) CSV format.
- The billing period covered by the available Cost Export files contains usage data.
Was this article helpful?
That’s Great!
Thank you for your feedback
Sorry! We couldn't be helpful
Thank you for your feedback
Feedback sent
We appreciate your effort and will try to fix the article