AWS Cloud Financial Management

How Medibank achieved cost visibility and control on AWS

Voiced by Amazon Polly

This post was co-written by Tony Zhai, Cloud Services & Solutions Manager, Medibank.

Most enterprises that employ centralized IT organizational structures with several lines of business use showback and/or chargeback mechanisms to hold various teams accountable for their technology consumption. Chargeback involves billing a department for the cost of its usage. Showback focuses on visibility to increase department cost consciousness and encourage operational efficiency.

With the right tools and strategy, organizations can achieve cost visibility and control to drive accountability and value realization that aligns with their business needs.

Medibank establishes cost allocation strategy

Medibank, a leading private health insurer with more than 45 years of experience, supports the health and wellbeing of millions of people in Australia. Medibank also offers life, travel, and pet insurance, and is committed to ensuring its products and services deliver the best value for customers—which is why managing cloud cost efficiently is so important.

As Medibank continued to migrate its workloads to AWS and onboard new applications in the cloud, it became increasingly important to establish both visibility and accountability of AWS cost and usage to each business unit and project, which would also help reduce the risk of costs exceeding the allocated budget. Teams also found it hard to optimize their usage due to lack of clear metrics and feedback loops.

Medibank built an effective showback/chargeback model to track cost across various teams and programs on AWS, helping build stronger accountability and governance across its business units.

To help build cost disciplines and accelerate business value realization in the cloud, Medibank invested in building and practicing stronger cloud financial management principles. Working closely with AWS, Medibank built a robust cost management solution that could track usage across various business units and provide mechanisms for showback/chargeback, helping them to strengthen accountability and governance on AWS.

Cost optimization solutions deep dive

Medibank implemented cost management and optimization solutions across these three pillars:

  • Manage and control –  Enforcing policy and governance through guardrails and checking for compliance against these guardrails.
  • Track and allocate –  Establishing cost and usage awareness and ownership by improving visibility and notification.
  • Optimize and save – Continuously monitoring and identifying opportunities for optimization and cost savings.
solutions across manage and control, track and allocate, and optimize and save

Figure 1. Medibank’s solution overview

Manage and control

The first part involves tagging the AWS resources (cost allocation tags) by cost centers, which maps to a specific business unit or a project. These tags can be used to track and aggregate different cost items at different organizational levels. Medibank uses AWS Organizations to help centrally govern all its AWS accounts.

Several guardrails have been put in place to enforce tagging compliance across the whole organization using service control policies (SCP). Refer to example SCPs for tagging resources for some samples. For services or resources that cannot be tagged like data transfer and support charges, these cost items are accounted for in a separate central business unit.

Medibank enforces tagging compliance using AWS Config. Non-compliant resources are remediated using AWS Systems Manager Automation documents. For more details, refer to “Remediating Noncompliant AWS Resources by AWS Config Rules”.

In the Rules section, the resources in scope for cost center tags are displayed along with their compliance state

Figure 2. AWS Config rule details

📖 READ: Cost control blog series

Track and allocate

With all the guardrails in place, the next step is to help make teams become cost-aware by improving visibility to their resource consumption. This is implemented as follows:

1.  Activating the custom defined cost allocation tags in the AWS Billing and Cost Management console to ensure that these data appear in the billing reports.

2.  An AWS Cost and Usage Report (CUR) containing hourly AWS consumption detail is created and stored in S3 in the payer account which consolidates data for all the linked accounts.

This CUR report is then queried by Amazon Athena using several customized views created in the main table to facilitate the allocation and reporting of costs. For example, one view defines relationship between cost center codes and the respective business unit they belong to so that all the line items in the CUR report can be associated and aggregated to a particular business unit.

3.  The aggregated data can now be queried using Amazon Athena, and visualized using Amazon QuickSight, as shown in Figure 3. Custom interactive dashboards are created using Amazon QuickSight and shared with the leads of the relevant business units. These provide a holistic view of consumption and trends, and enables a deeper dive if further details are required. The dashboards help business units identify any cases of unusual growth and determine specific areas for cost optimization.

QuickSight dashboard displaying the usage details for various cost centers in a business unit

Figure 3. Usage details for various cost centers

4.  A budget baseline for each business unit is defined to build an effective showback/chargeback model. The total expenditure tracked for a business unit is the sum of their on-demand usage and savings plan-covered usage. At the start of a new financial year, a baseline budget for each unit is derived from the average total cost in the past three months. This number is reviewed and adjusted by each team to accommodate for any organic growth or projected work for the year.

Once the budget has been set, any additional costs will ideally have specific project cost center tagging associated with the resources, so they can be charged back to the projects. AWS Budgets is used for each unit to send out alert notifications when certain thresholds are reached. This enables the teams to act promptly and prevent breaching their assigned budget. Figure 4 shows how a business unit is trending against its allocated budget.

QuickSight dashboard showing how a business unit is trending against its allocated budget

Figure 4. Trend analysis of a business unit

If you would like to set this up in your own account then you can follow the instructions provided in the following labs:

📹 WATCH: How to design your AWS cost allocation strategy 

Optimize and save

Continuous optimization is a philosophy that is deeply ingrained in Medibank, which leads to improved resource utilization and reductions in costs. To help with this process it has created a suite of automated workflows, ensuring AWS consumption is regularly reviewed and optimized. For example, in one of the workflows AWS Trusted Advisor analyzes the environment usage and provides cost saving recommendations. Based on the action that needs to be performed, a lambda function will be invoked to remediate those actions to realize the savings.

Another example is upon receiving a CloudWatch event from Trusted Advisor for an idle RDS instance via Amazon EventBridge, a lambda function will be triggered to stop the instance and perform other admin steps like updating its tags, etc.

Trusted Advisor recommendations showing idle RDS instances

Figure 5. AWS Trusted Advisor recommendation

As AWS continues to innovate with newer performant instance types with lower cost, it provides Medibank with another area for optimization. Medibank continuously evaluates these new offerings and incorporates them where applicable.

🔖 EXPLORE: Key ways to start optimizing your AWS cloud costs

Conclusion

With the implementation of these solutions, Medibank has the ability to accurately identify the usage and cost of systems, and then attribute the IT costs to individual business units. This has helped Medibank measure the return on investment (ROI) and give business units an opportunity to optimize their resources and reduce costs, a key factor in its transformation journey on AWS.

About Medibank Benefits Medibank achieved using AWS
Medibank is one of the largest Australian private health insurance providers, covering more than 3.7 million people. It also offers life, travel, and pet insurance, and is committed to ensuring its products and services deliver the best value and ensures the health and well being of its customers.
  • Enforced policy and guardrails to establish centralized governance across all AWS accounts
  • Established cost-aware culture by improving cost visibility and accountability of resource consumption
  • Enabled identification of spend trends or anomalies, and cost optimization opportunities
  • Reduced costs and improved resource utilization using automated workflows through AWS Trusted Advisor

Tony Zhai, Cloud services and solutions manager at Medibank

About our guest author

Tony Zhai is the Cloud Service and Solutions Manager at Medibank.

He leads the cloud engineering team in designing and implementing cloud solutions, managing the operations of cloud infrastructures, and providing governance on cloud services and cost control to help Medibank meet its evolving business needs.