Lesson 1 of 3 Cloud Cost and Usage Data

Sources of Cost and Usage Data

FinOps decisions combine several kinds of data, and each answers a different question. This lesson describes the main sources an engineer works with, from billing exports to utilization metrics and business data.

Learning outcomes

After completing this lesson, you will be able to:

  • Describe the billing exports of the major cloud providers.
  • Distinguish cost consoles and APIs from detailed exports.
  • Identify the context data that complements billing data.
  • Compare the freshness and detail of different data sources.
  • Choose the right data source for an engineering question.

Billing exports

The most detailed and authoritative source is the provider's billing export: files of cost and usage records delivered on a schedule to object storage or a data warehouse. Each record describes a resource or usage type over a time period, with the quantity used, the price and the resulting cost. The following list gives the main examples.

  • AWS Data Exports: delivers the Cost and Usage Report 2.0 and FOCUS-formatted exports to Amazon S3, along with other tables such as cost optimization recommendations and carbon emissions.
  • Azure Cost Management exports: scheduled exports of actual or amortized cost details, including a FOCUS format, to a storage account.
  • Google Cloud Billing export to BigQuery: standard and detailed usage cost data, and pricing data, exported to BigQuery datasets.

Billing exports can contain millions of rows a day for a large organization, so they are queried with a query engine or data warehouse rather than opened in a spreadsheet.

Consoles and cost APIs

Provider cost consoles, such as AWS Cost Explorer, Azure Cost analysis and Google Cloud Billing reports, summarize the same data for interactive analysis with filters and groupings. Their APIs let engineers retrieve summaries in scripts, for example daily cost by service for a dashboard or an alert. The AWS Cost Explorer API, for instance, charges a small fee per request, so scripts should cache results rather than call it repeatedly.

Consoles are ideal for questions such as "which service grew last week?" Exports are needed for allocation rules, joins with other data and long-term history.

Context data

Billing data says what was spent. Other sources explain why and whether it was worth it. The following terms describe the context data engineers most often combine with billing data.

Pricing data
Price lists and pricing APIs that give the rate for each service, region and option; used for estimates and to check rates on the bill.
Inventory and metadata
Resource configuration, tags and owners from provider APIs or a configuration management database (CMDB).
Utilization metrics
CPU, memory, network, disk and GPU use from monitoring tools; they show whether capacity was needed.
Recommendations
Rightsizing, idle resource and commitment recommendations from provider services or FinOps tools.
Business metrics
Orders, active users, API calls or other output measures; the denominator of unit economics.
Carbon data
Estimated emissions by account, service and region from provider carbon tools.

Choosing the right source

The question determines the source. The following table maps common engineering questions to the data that answers them.

QuestionPrimary source
What did my service cost yesterday?Billing export or cost console, filtered by tag or account
Is this instance oversized?Utilization metrics joined with billing data
What would a larger instance cost?Pricing data or a pricing calculator
Is our cost per order improving?Billing export joined with business metrics
Who owns this untagged resource?Inventory, creation records and account membership

The following diagram shows the sources a service dashboard joins.

The three sources behind a daily service dashboard. The billing export, filtered by account and tags, gives daily cost; request metrics from the observability platform give the denominator for cost per thousand requests; and utilization metrics joined to billing data by resource identifier show oversized instances.
Billing data alone cannot give unit cost or utilization.
Match the pairs

Which data source?

Exam skills 2.1.1

Match each question with the data source that answers it.

Log in to try this activity Interactive activities are free with an account.

How fresh and how detailed each source is

Sources differ in how often they refresh and how much detail they hold, and these differences decide what each source can be used for. Billing exports are typically refreshed one or more times a day and can hold hourly, resource-level detail, but the most recent day is incomplete. Utilization metrics from monitoring tools are available within minutes and at one-minute or five-minute resolution, but are often retained in full detail for only a few weeks, so rightsizing analysis must capture them before they are aggregated or deleted.

Recommendations from provider services are usually refreshed daily and based on a look-back window, such as the last 14 days, which may miss a monthly peak. Carbon data is the slowest: monthly and published weeks or months later. Business metrics vary with the systems that produce them; an orders database is current, while revenue figures may only be final after the accounting close.

Engineers should therefore match the source to the decision's time frame. Detecting a runaway job needs the freshest data available, often utilization or daily billing data. Choosing a commitment needs months of history. Reporting unit cost to leadership needs closed billing periods and finalized business metrics for the same period.

Worked example

Building a service dashboard

An engineering team wants a daily dashboard showing its service's cost, cost per thousand requests and whether its instances are oversized. Which sources does it need?

It needs three sources. The billing export, filtered by the team's account and tags, gives daily cost. The service's request metrics from its observability platform give the denominator for cost per thousand requests. Utilization metrics joined to billing data by resource identifier show which instances run at low utilization. A console alone could show cost, but not the unit cost or utilization view.

Worked example

A script that became expensive

An engineer wrote a script that calls a cost API every minute for each of 40 teams to update a wall display. The API charges per request. What is wrong with the design?

Billing data is refreshed only a few times a day, so calling the API every minute returns the same figures while generating about 1.7 million requests a month (40 x 60 x 24 x 30). The script should call the API once or twice a day and cache the results, or read from the billing export that is already being delivered.

Check yourself

Which data source shows whether an expensive instance was actually needed?

Show answer

Utilization metrics joined with billing data. Billing data shows that the instance cost money; utilization shows whether its capacity was used.

Exam Tips

Remember for the exam

  • The billing export is the most detailed, authoritative source of cost data.
  • Consoles and cost APIs summarize the same data; some APIs charge per request.
  • Utilization, inventory, business and carbon data add the context that billing data lacks.
  • Choose the source according to the question being asked.