The Cloud Business Office at VMware has a longstanding relationship with CloudHealth, having been a customer before the acquisition of the SaaS platform in the fall of 2018. Strong advocates and early adopters of new product releases, the Cloud Business Office leverages the new CloudHealth FlexReports feature to implement an equitable chargeback model to internal business units and cost centers. FlexReports allows users to easily build reports across various dimensions to perform a more granular analysis of AWS cost, usage, and asset data.
Developing an equitable enterprise AWS chargeback model
It's a common practice for enterprises to chargeback costs to internal business units or cost centers. But on a monthly basis, this process can be time-consuming. The Cloud Business Office wanted a solution that allowed them to use the AWS Cost and Usage Report (CUR) to build a customized chargeback solution.
The motivation for a customized solution stemmed from their use of Reserved Instance (RI) discounts and Savings Plans (SP), and the fact that these offerings can (and will) float across accounts, resulting in some workloads receiving higher discounts compared to others.
To nullify AWS’ rules for discount coverage, the Cloud Business Office implemented an equitable chargeback model. The goal of the equitable chargeback model was twofold:
- To distribute all currently available discounts proportionally.
- To give product teams the ability to increase their discounts.
Given VMware is a large enterprise with dozens of products, hundreds of cost centers, and thousands of AWS accounts, the Cloud Business Office knew that the only way for them to optimize their Reserved Instance and Savings Plans coverage would be to create a feedback loop with the product teams. By working with the product teams to identify cloud usage patterns, such as when a team launches a new product and expects increased demand, the Cloud Business Office can plan discount coverage appropriately.
Steps for using CloudHealth FlexReports
The Cloud Business Office took the following steps to use CloudHealth FlexReports as the data source for Cost and Usage Report data.
1. Create a data pipeline using FlexReports
1.1. The Cloud Business Office first created a FlexReport containing detailed daily costs per AWS service–called “Usage Report.”
1.2. Then they created a FlexReport containing Reserved Instance and Savings Plans amortization details–called “Amortization Report.”
2. Create the chargeback model
2.1. From the Usage Report, they split usage to reflect each of the pricing models separately: RI, SP, and On-Demand (including Spot). To do this, they applied the filters to separate each category:
- Condition for the RI bucket: LineItem_LineItemType = “DiscountedUsage”
- Condition for the SP bucket: LineItem_LineItemType = “SavingsPlanCoveredUsage”
- Condition for the On-demand bucket: LineItem_LineItemType = “Usage"
2.2. Calculate an Effective Dollar Discount (EDD) (the savings over On-Demand) for each applicable AWS service (e.g. Redshift RIs, Lambda SPs). EDD can be considered the normalization factor–that neutralizes any differential advantage given by AWS discounting–and levels the playing field in terms of discounts for all accounts.
- Condition for services that are RI applicable: EDD(Redshift) = sum(pricing_publicOnDemandCost)-sum(reservation_EffectiveCost)
- Condition for services that are SP applicable: EDD(Lambda) = sum(pricing_publicOnDemandCost)-sum(savingsPlan_SavingsPlanEffectiveCost)
2.3. Distribute the EDD per AWS service proportionally across all accounts based on their usage for the month, meaning that the higher the usage in the account, the greater the discount will be.
To enable this proportional distribution, the Cloud Business Office calculated a ratio called “Cost_ratio”. The column ‘pricing_publicOnDemandCost’ used for the calculation of the Cost_ratio, represented the On-Demand or the cost before any discount of each LineItem. They used this ratio to redistribute everything from amortized and recurring costs to indirect costs. This step was applied to each LineItem within each AWS service that has RIs or SPs applied to them.
2.4. Calculate the new cost (equitable cost) for each LineItem that has RIs or SPs applied to it. The Cloud Business Office applied the equation below to LineItems only within each applicable AWS service, since they will each have their own EDD. EDD was then distributed to accounts that have used that service for that month of chargeback.
- For each LineItem: Equitable_usage_cost = pricing_publicOnDemandCost - (cost_ratio*EDD)
- For each UsageAccount ID: Equitable_usage_cost(Account X) = sum (Equitable_usage_cost)
2.5. The last step is to calculate costs that have either been On-demand or undiscounted (do not have SP or RI applied to it).
- Condition for the On-Demand bucket: LineItem_LineItemType = “Usage”
- For each UsageAccountID, calculate: OnDemandUsage = sum(LineItem_UnblendedCost)
- For each UsageAccountID: MonthlyChargebackTotal(Account X) = Equitable_usage_cost + OnDemandUsage
The MonthlyChargebackTotal will reflect the cost to be charged back to the account for that month. Depending on your accounting rules, you can redistribute any other centrally applied cost using the Cost_ratio.
By taking the steps outlined above, the Cloud Business Office was able to generate a CSV containing the date, cost center, business unit, and dollar amount to be charged back, thereby providing the finance team a file to easily import into the general ledger system.
As a result, the Cloud Business Office was able to reclaim five days worth of employee time previously spent on this process, to a compute job that runs in minutes. The real value is that now the Cloud Business Office can centrally manage Reserved Instances and Savings Plans with the ability to improve discounts and coverage for individual teams.
You can see the detailed source article written by Sanjna Srivatsa on the AWS Cost Management Blog!
And for more information about CloudHealth and FlexReports, request a free demo of the CloudHealth platform today.