Cloud Cost Optimization: The Practical Guide for AWS, Azure, and GCP
Cloud bills grow quietly until someone asks why. This is the map for cutting spend without cutting reliability: where the money actually goes, the levers that work, and the tools worth paying for.
Key takeaways
- Cut cloud spend by attributing it first, then working the levers in order.
- Fix NAT and egress, delete idle resources, right-size compute and databases, commit to the steady baseline with Savings Plans, and move interruptible work to spot.
- Make cost a standing metric with an owner so the savings do not creep back.
On this page
To cut a cloud bill without hurting reliability, attribute spend by team and environment first, then work the levers in order: NAT and egress, idle resources, right-sizing, commitments for the steady baseline, spot for interruptible work, and Kubernetes requests. The waste is rarely one big thing; it is dozens of small line items nobody owns.
Verified against
AWS Savings Plans, EC2 Spot, VPC gateway endpoints and CloudWatch Logs retention, against the AWS user guides and pricing pages. Checked October 2026.
Bills creep rather than spike: a forgotten environment, an oversized instance family, egress nobody modeled. Each lever below links to its deep dive.
First, see where the money actually goes
You can't cut what you can't attribute. Before touching anything, get spend broken down by service, team, and environment, and set up alerting so the next spike shows up in hours, not on the invoice. That's covered in catching AWS cost spikes before the invoice.
The usual shape once you can see it: compute is the biggest line, then data transfer and storage, then managed services and observability. Attribution only works if resources carry team, environment, and project tags, so enforce tagging and flag untagged resources; without it, accountability evaporates.
Compute: right-size, then commit, then go spot
Compute is where the largest savings live, in three layers.
Right-size first. Most instances run at a fraction of their provisioned CPU and memory. Pull 30 days of CPU, memory, and network metrics and flag anything under about 30% p95 utilization on its bottleneck resource. Right-sizing often means a smaller instance in a newer generation: m5.xlarge to m6i.large, c5.4xlarge to c6i.2xlarge, r5.2xlarge to r6i.xlarge. It is usually the largest single change. Every provider has a free recommender for this: AWS Compute Optimizer, GCP Recommender, and Azure Advisor.
Commit to the steady state. For the baseline you always run, commit. AWS says Savings Plans save "up to 72%" on compute for a one- or three-year term (as of October 2026), and Compute Savings Plans apply regardless of instance family, size, or Region, and cover Fargate and Lambda too. We'd cover roughly 70% of baseline with a 1-year Compute Savings Plan and stay at one year if the workload is still changing; because the plan flexes across instance types, it survives later right-sizing better than Reserved Instances tied to a class. The tradeoffs are in reserved instances vs savings plans vs spot. GCP's discounts work differently, explained in committed use vs sustained use discounts.
Use spot for the interruptible parts. AWS quotes spot at up to 90% off On-Demand, and batch jobs, CI, and stateless workers can take that deal if you handle interruptions, as in running production on spot safely. EC2 issues an interruption notice two minutes before it stops or terminates a spot instance. A sane EKS split: batch and async worker pools fully on spot, web pools mixed, stateful pools on-demand only, with Karpenter provisioning spot, draining nodes on the notice, and falling back to on-demand when capacity runs out.
Which provider is cheapest for your mix is its own question, answered in AWS vs Azure vs GCP pricing.
Storage and data transfer: the quiet line items
Storage looks cheap per GB and adds up fast, and pricing differs enough between providers to matter, compared in S3 vs Azure Blob vs GCS. Lifecycle rules from day one prevent most of it: logs to Glacier Instant Retrieval after 30 days and Deep Archive after a year, backups to Glacier after 90 days, build artifacts deleted after 180 days. Request charges and minimum storage durations can eat those savings on small objects, which is the subject of S3 cost traps in storage classes and requests. Set CloudWatch Logs retention too: by default, log data is stored indefinitely.
The bigger surprise is usually egress: cross-AZ, cross-region, and NAT gateway traffic nobody modeled. The classic case is one service downloading a large ML model from S3 on every pod start, through the NAT. An S3 gateway endpoint routes that traffic around the NAT, and AWS states there is no additional charge for gateway endpoints:
# find NAT-heavy traffic first, then route S3 around the NAT
$ aws ec2 create-vpc-endpoint \
--vpc-id vpc-0abc123 \
--vpc-endpoint-type Gateway \
--service-name com.amazonaws.us-east-1.s3 \
--route-table-ids rtb-0def456
Interface endpoints for ECR image pulls, Secrets Manager, and SSM help as well, but unlike gateway endpoints they are billed hourly plus data processing, so check the math per service. Consolidating duplicate cross-region copies and keeping logging pipelines in-region close the rest. The patterns are in cloud egress costs explained.
Managed services and zombies
Managed databases and caches get the same right-sizing treatment. RDS instances sized for "headroom" on r5.4xlarge often fit on r5.xlarge; old db.t2 moves to db.t3 or Graviton db.t4g; databases on provisioned-IOPS io1 that don't need the IOPS move to gp3. ElastiCache clusters shrink the same way, often onto fewer, newer Graviton nodes.
Zombies are small but free to fix: unattached EBS volumes, orphaned snapshots, load balancers with no targets, NAT gateways in unused test VPCs, old AMIs. Script a list, review it by hand, then delete.
# unattached EBS volumes: billed every month, attached to nothing
$ aws ec2 describe-volumes --filters Name=status,Values=available \
--query 'Volumes[].[VolumeId,Size,CreateTime]' --output table
Kubernetes: cost hides inside the cluster
A Kubernetes cluster is a cost black box unless you instrument it. Requests set too high waste the whole node; bin-packing and autoscaling recover it. The tools that surface and act on this (Kubecost, OpenCost, Cast AI) are compared in Kubernetes cost optimization tools.
The fastest wins, in order
When someone hands you a bloated bill and a week, this is the order that pays back fastest, detailed in how to cut your AWS bill by 40%:
- Check NAT and egress first. It is the most common surprise, and the gateway-endpoint fix is mechanical.
- Delete idle and orphaned resources.
- Right-size the obvious over-provisioned instances and databases.
- Kill or downsample runaway logging and observability ingestion.
- Commit to the steady-state compute, then move stateless pools to spot.
Four ideas that usually don't pay off
Forcing Graviton everywhere: gains vary by service and per-architecture images cost toil, so use it for new workloads. Scale-to-zero on steady workloads: it just churns. Multi-cloud price arbitrage: real but small savings, rarely worth the operational overhead. Self-hosting to cut SaaS bills: the invoice drops, but engineer time can match it.
Buy the right tooling, and keep the wins
Past a certain scale, spreadsheets stop working and a cost platform pays for itself. The options (CloudZero, Vantage, Cast AI, and the native cost tools) are in best FinOps and cloud cost tools.
Costs creep back without a routine. Ours is a 30-minute monthly cost review, cost tracked per feature so anomalies get an owner, a cost estimate in any PR that adds major infrastructure, and a quarterly pass through the recommender's high-confidence suggestions.
The decision, concretely
- No per-team cost breakdown yet? Fix tagging and anomaly alerts before cutting anything.
- High NAT or data transfer charges? Add gateway endpoints and keep traffic in-region; it's the cheapest fix on the list.
- Steady baseline compute? Right-size first, then a 1-year commitment covering most of the baseline.
- Stateless or batch workloads on on-demand? Move them to spot with graceful drain and on-demand fallback.
Questions people ask
What is the fastest way to reduce a cloud bill?
Look at NAT gateway and data transfer charges first, because an S3 gateway endpoint carries no additional charge and removes NAT processing for S3 traffic. Then delete unattached volumes, old snapshots and idle load balancers, and right-size instances running well under their provisioned capacity. Those three steps need no commitment and no architecture change, so they pay back within the first billing cycle.
Should I buy Savings Plans or Reserved Instances first?
For most AWS compute, a Compute Savings Plan. It applies across instance family, size, OS, tenancy and Region, and also covers Fargate and Lambda, so it survives right-sizing and migrations. For managed databases like RDS, check AWS's list of services eligible for Savings Plans before assuming coverage, and use Reserved Instances where the plan does not apply. Right-size before committing either way, or you lock in a discount on capacity you were about to delete.
Is spot safe for production workloads?
Yes for stateless and interruptible work, no for anything that cannot lose a node with two minutes of warning. EC2 sends the interruption notice two minutes ahead on a best-effort basis. Run web tiers mixed with on-demand, keep stateful pools on-demand, and make sure your autoscaler drains nodes on the notice and falls back to on-demand when spot capacity is unavailable.
The call we'd make
Instrument spend first so every change is measurable, then work the levers in order: egress and zombies, right-sizing, commitments, spot, then the cluster. Make cost a standing metric with an owner, not a quarterly fire drill. The teams that win are the ones who can see all fifty small leaks. The caveat is that every percentage depends on your mix, so run the free recommender on your own bill before trusting anyone's numbers, ours included.
Sources
Cite this article
Kiril Urbonas (2026). Cloud Cost Optimization: The Practical Guide for AWS, Azure, and GCP. DevOpsNess. Updated 2026-10-31. https://www.devopsness.com/blog/cloud-cost-optimization-guide
[Cloud Cost Optimization: The Practical Guide for AWS, Azure, and GCP](https://www.devopsness.com/blog/cloud-cost-optimization-guide) (Kiril Urbonas, DevOpsNess, updated 2026-10-31)
More from Cloud
Explore more articles in this category
.NET 8 Support Ends November 10: The Lambda and Azure Functions Checklist
.NET 8, .NET 9, the Lambda dotnet8 runtime and the Azure Functions in-process model all lose support on November 10, 2026. Inventory commands, the isolated-worker migration and a CI gate.
Google Cloud's europe-west2 Outage: One Zone Lost Power and the Region Stalled for 6 Hours
On October 20, 2026, europe-west2-b lost power when its generators never started. Cross-zone control-plane timeouts then degraded the whole London region. What happened and the gcloud audit to run now.
Lambda Python 3.10 Is Deprecated Today: Find Every Function and Move to 3.13
AWS deprecated the Lambda python3.10 runtime on October 31, 2026. Functions keep running, patches stop. The inventory commands, IaC diffs and AL2023 gotchas for moving to python3.13.
You might have missed
Evergreen posts worth revisiting.