Cloud
Keeping cloud costs sensible as your product grows
Cloud bills rarely jump because of one bad decision. They creep, through forgotten resources and defaults nobody revisited. A few habits keep them in check.
The cloud makes it easy to start small and grow. It also makes it easy to spend money without noticing. A test environment left running over a holiday, a database sized for a launch that never needed it, logs retained forever by default: each is minor on its own, and together they add up to a bill that surprises the finance team every month.
Controlling cloud costs is not about squeezing every penny or constantly switching providers. It is about visibility, sensible defaults and a regular habit of review. The practices below apply whether you run on AWS, Google Cloud, Azure or a simpler platform.
You cannot manage what you cannot attribute
The first step is knowing where the money goes. Most providers can break costs down by service, but that rarely answers the questions a business asks, such as how much a particular product, customer or environment costs to run.
Consistent tagging fixes this. Agree a small set of tags, typically environment, product or service, owner and cost centre, and apply them to every resource. Enforce the policy in your infrastructure as code so untagged resources cannot be created, rather than relying on people to remember. Separate accounts or projects for production, staging and development also make attribution much clearer and limit the damage of mistakes.
Set budgets and alerts on day one
Every cloud provider offers budgets and alerts, and they take minutes to configure. Set a monthly budget per account or environment, with alerts at thresholds that give you time to react, and route those alerts to someone who will actually read them. Anomaly detection, where available, is worth enabling too: it catches sudden spikes, such as a runaway job or a misconfigured autoscaling rule, long before the monthly invoice does.
Cloud bills rarely jump because of one bad decision. They creep.
Right-size, then keep right-sizing
Resources are usually sized at launch with generous headroom, and then never revisited. Reviewing actual utilisation for compute instances, databases and containers often shows that many are running well below capacity. Common opportunities include:
- Reducing instance and database sizes to match real load, with autoscaling handling peaks.
- Scheduling non-production environments to shut down outside working hours.
- Deleting unattached storage volumes, old snapshots and unused load balancers or IP addresses.
- Setting retention policies on logs, backups and object storage so data does not accumulate indefinitely.
- Moving infrequently accessed data to cheaper storage tiers.
- Committing to reserved capacity or savings plans only for workloads that are stable and well understood.
Commitment discounts can be significant, but they lock you in. Right-size first, observe for a while, and commit only to the baseline you are confident about.
Managed services versus self-hosting
Managed databases, queues and container platforms usually cost more per unit of compute than running the same software yourself on virtual machines. That comparison is misleading, because it ignores the engineering time spent on patching, backups, failover, upgrades and being woken at night. For most small and mid-sized teams, managed services are cheaper once people's time is counted, and they reduce operational risk.
The balance can shift at larger scale, or for workloads with very steady, predictable usage, where the premium on a managed service becomes material and the team has the skills to run the alternative well. Kubernetes is a good example: powerful and flexible, but for many products a simpler managed container service or platform does the job with far less overhead. We would rather recommend the boring option that your team can operate confidently.
Watch data transfer and architecture choices
Egress, the cost of data leaving a provider's network or moving between regions and zones, is one of the least intuitive line items. It can grow quietly with traffic, and it is often driven by architecture rather than usage. Things to check:
- Serve static assets and media through a CDN rather than directly from your servers or storage.
- Keep services that talk to each other heavily in the same region, and be deliberate about cross-zone traffic.
- Be careful with architectures that copy large volumes of data between clouds or out to third-party tools.
- Check the cost of NAT gateways and similar networking components, which are easy to overlook.
Architecture matters beyond networking. Chatty services, unbounded queries and inefficient background jobs all translate directly into spend. Some of the best cost savings come from ordinary performance work in the application itself, which is why we treat cost as part of software development, not only as an infrastructure concern. For SaaS products, understanding the cost to serve each customer also informs pricing.
Make cost part of how the team works
The most durable fix is cultural. When engineers can see the cost of what they deploy, they make better decisions without being asked. Sharing a simple cost dashboard, discussing notable changes in regular team meetings, and including cost in design reviews for significant new features all help. None of this needs a dedicated team; it needs someone accountable and a regular rhythm.
Summing up
Tag everything, set budgets and alerts early, right-size regularly, prefer managed services until you have a clear reason not to, and keep an eye on data transfer. If your bill has grown faster than your product and you are not sure why, a focused cloud and DevOps review is usually the quickest way to find the causes and put guardrails in place.