Understanding Cloud Cost & Usage Reports - AWS CUR, part 1
Narciso Cerezo
Global Head of FinOps @ BBVA | FinOps Ambassador | Certified FinOps Practitioner & Engineer | Speaker | Cloud Enthusiast | Former Entrepreneur | Software Architect, developer and lover | My opinions are my own
Introduction
There are currently a great many tools in the market to help you maximize the benefits of FinOps, but in the first stages it might be good to understand how the different cloud providers cost and usage reports work.
If you are anything like me, you like to know how things work. Understand them to be able to visualize how to put them to use.
Also, since at the start of the FinOps journey visibility of your costs and usage is paramount to know where to go from there for your particular case, understanding the ins an outs of these reports can help you build some basic dashboards before committing to a third party tool.
This article aims to be the first of a series covering the three top Cloud Service Providers (Amazon Web Services, Microsoft Azure & Google Cloud Platform).
AWS CUR - The basics
Since AWS was first, they have been evolving their reports for a longer time, and thus they have been going through several cycles of improvement.
Currently, these reports are know as "Cost & Usage Reports", or CUR for short.
The CUR is a huge file by now and, if you have a sizable consumption with many accounts under an organization, it will be a very large dataset.
Basic structure
You can think of the file as a huge spreadsheet, with millions of rows (and more than 300 columns).
If you just wish to know how much money you spent in a certain period, you just need to sum the column line_item_unblended_cost (for the rows in that period, that is).
However, for each "usage" of a resource there are several lines with different types. A few examples:
For the use of some S3 storage you could have two different lines:
For the purchase of a partial upfront reserved instance purchase (a large one):
领英推荐
Much of the same calculations that result from summing up the unblended cost across lines are also detailed in the main "usage" line using specific fields. You have specific fields for discounts, for example, and you have another field called line_item_net_unblended_cost that is the result of applying any discounts to the line_item_unblended_cost field.
This gives you a lot of flexibility to perform queries for many different purposes.
And then, to put those 300 fields to work, depending on the type of line some will be populated to show you the details specific for that type of usage (for example, the usage of RIs or Savings Plans). So you can check how you are making use of the reservations, for example.
Remember this is not just cost, is also usage.
Field groups
Fields are grouped in sets related to different types of activity:
Basic usage information
The basic usage information can be obtained from the line_item_* group of fields, the most relevant ones that will allow you to understand and run some queries on the files are:
Types of line
The different types of lines can be discriminated using the line_item_line_item_type field. These are the most common types of lines (some types and some fields even, will appear depending on your type of contract and migth be under an NDA, those I will not cover here):
This is just barely scraping the surface of what you can do with the CUR, but it should help you extract some useful information from them.
Sr. Technical Account Manager en Amazon Web Services
2 年This series of articles reflects all the great job you are materializing Narciso Cerezo. Feeling lucky to follow closely this inspiration!