AWS Billing Integration
Integrating AWS billing with Unravel is essential for accessing accurate insights and reports from detailed cost analysis. This integration ensures that cost insights are precise and aligned with AWS billing data.
Note
If AWS billing is not integrated, Unravel will generate approximate cost insights, which may differ from actual costs in AWS.
Important
Databricks system table is mandatory in your Databricks environment to enable AWS billing integration. Make sure it is enabled to proceed with Unravel's billing integration. For more details on how to configure the Databricks system table, see here. If the Databricks system table is not integrated, Unravel cannot ingest any DBU data; therefore, no data will be displayed on the Billing or Chargeback pages for it.
Setting up the AWS Data Export
Before integrating with Unravel, you must set up cost exports in your AWS environment to direct billing data to an Amazon S3 bucket.
{"QueryStatement":"SELECT bill_bill_type, bill_billing_entity, bill_billing_period_end_date, bill_billing_period_start_date, bill_invoice_id, bill_invoicing_entity, bill_payer_account_id, bill_payer_account_name, cost_category, discount, identity_line_item_id, identity_time_interval, line_item_availability_zone, line_item_blended_cost, line_item_blended_rate, line_item_currency_code, line_item_legal_entity, line_item_line_item_description, line_item_line_item_type, line_item_net_unblended_cost, line_item_net_unblended_rate, line_item_normalized_usage_amount, line_item_operation, line_item_product_code, line_item_resource_id, line_item_unblended_cost, line_item_unblended_rate, line_item_usage_account_id, line_item_usage_account_name, line_item_usage_amount, line_item_usage_end_date, line_item_usage_start_date, line_item_usage_type, pricing_currency, pricing_lease_contract_length, pricing_purchase_option, pricing_rate_code, pricing_rate_id, pricing_term, pricing_unit, product, product_product_family, product_servicecode, product_sku, resource_tags FROM COST_AND_USAGE_REPORT"}{"TableConfigurations":{"COST_AND_USAGE_REPORT":{"INCLUDE_RESOURCES":"TRUE","INCLUDE_SPLIT_COST_ALLOCATION_DATA":"FALSE","TIME_GRANULARITY":"DAILY"}}}
Log in to the AWS Management Console.
Go to Billing and navigate to Cost and Usage Reports.
Select Create Report, and configure the mandatory settings. The following are the mandatory settings that need to be configured:
Example AWS DataExport settings
Here is an example of how the Data Export appears in the AWS console with configured mandatory settings. The values given in this example are for reference. You can configure the required values;
Enter the export name.
Under Data Table, select Cost and Usage report (CUR) and select the required time granularity.
Preview the SQL Query.
Under Compression type and file format, select gzip-text/csv. Under Data export storage settings, select the required S3 destination.
Note
Only CSV format is supported with Unravel.
Under Data export overwriting, select Create new data export file. Under Data export storage settings, select the required S3 destination.
Integrating AWS Bill with Unravel
After setting up data exports, configure Unravel to import AWS billing data from your S3 bucket. Follow these steps:
Configure AWS Billing Integration Properties in Unravel
Note
Unravel supports cross-account access to S3 buckets using role-based access control (RBAC).
Stop Unravel Services.
<Unravel installation directory>/unravel/manager stop
Configure the following properties using the manager command.
Property
Description
Type
Default Value
com.unraveldata.aws.bill.import.dataexports.name
Specifies the name of the AWS billing data export file.
String
com.unraveldata.aws.bill.import.dataexports.prefix
Defines the prefix applied to the exported AWS billing data files.
string
com.unraveldata.aws.bill.import.enabled
Enables or disables AWS billing data import in Unravel.
string
true
com.unraveldata.aws.bill.import.lookback.days
Specifies the number of past days of AWS billing data to import.
integer
30
com.unraveldata.aws.bill.import.region
Defines the AWS region where the billing data is located.
string
com.unraveldata.aws.bill.import.s3.bucket.name
Specifies the name of the S3 bucket containing the AWS billing data files.
string
com.unraveldata.aws.bill.import.user.access.key
Specifies the AWS access key ID for accessing billing data.
string
com.unraveldata.aws.bill.import.user.secret.key
Specifies the AWS secret access key for accessing billing data.
string
Apply the configuration changes.
<Unravel installation directory>/unravel/manager config apply
Start Unravel services
<Unravel installation directory>/unravel/manager start