Why cost is an engineering problem
Cloud cost has become part of the DevOps job description. Companies expect platform engineers to know where the money goes, to design for cost as well as reliability, and to cut waste without hurting production. In interviews it shows up as "our AWS bill doubled, what do you do?", "Spot or Savings Plans?" and "how do you split EKS costs between teams?". This topic covers how AWS charges, how to get visibility, how to optimise compute, Kubernetes, storage and data transfer, and how to make cost control stick.
FinOps in one page
FinOps is the practice of making engineering, finance and business teams jointly responsible for cloud spending, so decisions trade off cost, speed and quality deliberately. The FinOps Foundation describes it as a loop of three phases:
- Inform: everyone can see what they spend and why (allocation, tagging, dashboards, forecasts).
- Optimise: reduce waste and pay less for what you use (rightsizing, commitments, Spot, architecture).
- Operate: make it routine (budgets, reviews, guardrails, accountability).
Engineers create most cloud cost through design choices: instance sizes, replica counts, log volumes, cross-AZ chatter, forgotten test environments. That's why cost needs to be visible to the people who make those choices, not just to finance at the end of the month.
Unit economics
Total spend rising is not automatically bad: it may track growth. Measure cost per unit of business value:
- Cost per 1,000 orders, per active user, per GB processed, per build minute.
- If revenue doubles and the bill rises 40%, unit cost fell: good. If traffic is flat and the bill doubled, something is wrong.
- Unit cost lets you compare architectures ("moving thumbnails to Lambda cut cost per image by 60%") and set targets teams can own.
How AWS charges
| Category | Typical drivers | Common surprises |
|---|---|---|
| Compute | Instance hours by type and size, Lambda GB-seconds, Fargate vCPU and memory | Oversized instances, idle dev environments, steady load on on-demand |
| Storage | GB-months by class, IOPS and throughput, snapshots | Old snapshots, unattached EBS volumes, logs kept forever |
| Data transfer | Internet egress, cross-AZ, cross-region, NAT gateway processing | NAT gateway charges per GB, chatty services across AZs |
| Requests and operations | S3 requests, API calls, CloudWatch metrics and log ingestion | Millions of small S3 PUTs, high-cardinality custom metrics |
| Managed services | RDS instance and storage, OpenSearch, MSK, load balancers | Multi-AZ doubling cost in dev, load balancers per tiny service |
Data transfer is the most misunderstood line. Inbound data from the internet is free; outbound to the internet is charged per GB; traffic between Availability Zones costs about $0.01 per GB in each direction; NAT gateways charge per hour plus around $0.045 per GB processed in many regions; and since 2024 every public IPv4 address costs about $0.005 per hour, whether attached or not.