Shift-left cost optimization with nOps AWS Chargeback
Does “chargeback” sound like a punishment to you? Does it scream, “We don’t trust you, so we’re going to charge you for what you use!” You can imagine that this attitude would cause friction in organizations, and maybe it’s one of the reasons why chargeback implementation isn’t as widespread as you’ve imagined.
So why do it then? Those that use cloud chargeback do so to answer the CFO’s monthly question of “Who spent this money and what for?”
With chargeback, the CFO and finance team can see it for themselves. In real-time. So chargeback can indeed be used to avoid the monthly inquisition but maybe not the punishment.
But there’s another reason why chargeback is healthy for your cloud: people can only be held accountable for cloud costs when they can see the impact of what they do in terms of money spent and in real time, not at the end of the month — that’s way too late!
So if you want to avoid conflict, keep the CFO informed, and make folks accountable for what they do in the cloud, then real-time shift-left cost optimization through chargeback is what you need.
Here is James Governor’s take on the thinking behind Spotify’s tactic to shift cost optimization left and make developers accountable for the cloud costs they incur.
“Early experiences with Cost Insights allowed Spotify to fund the equivalent of 25 teams across the company. One interesting part of the Spotify cost optimisation journey is that it is not based on driving specific team OKRs. Engineers and teams don’t get the money back that they save, to spend on their own product, but rather it goes back into the company. The incentives are communal and cultural rather than directly financial. Cost Insights could be used as part of engineering bonus structures, at more financially oriented companies. But for Spotify at least the idea is simply to optimise so that everyone in the company benefits. This communitarianism probably reflects the fact Spotify is a Swedish company, with Scandinavian values.”
Shift-left cost joins shift-left security in the DevOps workflow
Security shifted left first when DevOps appeared. Making the developers responsible for the security of their applications and configurations was seen to be a good thing.
We might wonder how well this has worked out for security, given a recent report that 40 apps with more than 100 million users were found to be breaking basic AWS security standards by hard-coding their AWS API keys. However, these are configuration files embedded in code source control and not the visible-to-all cloud billing files.
The “fast feedback” and “trust but verify” mantras that apply to security now apply to cost: give developers the tools that can shift the security and cost tools left along the DevOps workflow.
Spotify engineering is implementing this because they have a big AWS bill, and they have a big engineering team that does DevOps and can write their own tools to do this.
But you don’t need to have a big AWS bill or a team to write your own chargeback tools, and you don’t need to be a certified specialist in FinOps to implement chargeback.
So how do you get started with shift-left cost optimization?
Simple AWS chargeback that everyone should have
Most people give up on chargeback because they imagine lots of complicated things like “enterprise cross-charging” and “internal billing.” They even get into the weeds on AWS Savings Plans and Reserved Instances and blended costs. That’s not necessary. It can be much simpler than that.
Here’s how you do it. You still have one AWS bill for your consolidated accounts, so finance still pays the big bill: what chargeback gives you is visibility into what parts of that bill have been spent by whom. People are accountable because they can see — everyone can see — what costs they’ve incurred.
- Teams and projects are accountable without having to actually pay the bill themselves.
- You’re not delegating bill payment.
- You’re making them accountable by attributing cloud costs to them on a dashboard.
All you need to get started with chargeback are these ingredients to create a “chargeback bucket”:
|Who will be charged?||Is it a team, a project, a person?|
|What’s their budget?||Everyone has one. Alerts are possible.|
|What are they accountable for?||It might be an AWS account, or maybe they are responsible for database services or even use AWS tags to pick out their stuff.|
The budget allocation is an interesting one. Not only can you match it to a team’s or project’s actual internal budget, but you will be able to get notifications on overspend.
Picture the finance team: their big monthly AWS bill is now broken down into team- or project-aligned costs where they can match the budget to spend. Finance likes that.
Implementing AWS chargeback with nOps
Chargeback Center is one of the nOps’ Cost Control tools. Users typically configure this when using nOps for their continuous Well-Architected Framework Review of the Cost Optimization pillar.
By going to the nOps account in question — and each nOps account can be linked to one or more AWS accounts — you can quickly create a chargeback “bucket” that links a team or project to AWS resources and their costs.
That’s it. It takes minutes.
These are human-readable names that mean something to you.
Chargeback types are a label that helps YOU understand how YOU manage chargeback and doesn’t change how nOps works.
For example, you might consider internally cross-charging some teams and put “Cross-charge” as the type. For others, you may want to see what the team is spending under a bigger budget and put “Team” as the type. Dead simple.
Finance teams like predictability. Most organizations give teams and projects a budget. They want to know when the budget is exhausted. They want to know about overspending. They want to be notified.
Chargeback filters are how you link the team or project to its AWS resources. Once you’ve completed this simple form, your chargeback is running.
Other things you can do with nOps chargeback:
- You can go from AWS Region and accounts down to the granularity of AWS tags to allocate resources to the chargeback bucket.
- You get a dashboard for that chargeback and you get notifications.
- You can set the period to monthly, quarterly, or annually.
- You can see underspend and overspend.
- You can see the history and mark overspend as paid or not.
Chargeback is an important yet often missed and misunderstood part of the cost-optimization pillar of Well-Architected.
nOps can help you put a simple and effective solution in place.
You can make your AWS cost-optimization more professional with zero hassle by starting with an nOps Free Trial:
Is this in the nOps Documentation?
Yes, there’s a step-by-step guide here