The function is cheap, the database it talks to often is not. Connection limits, proxies, and idle capacity turn a per-request compute model into a per-hour database bill. Here is how to pair them well.
On-demand looks expensive per request and provisioned looks cheap, until the traffic spikes. Burst shape, not average volume, decides which capacity mode costs less. Here is the arithmetic for bursty workloads.
A function on a one minute schedule runs 43,200 times a month whether or not there is work to do. Polling schedules are the quietest source of waste in a serverless estate. Here is the arithmetic.
Resizing images in functions looks trivially cheap per image until you count storage, egress, ephemeral disk, and the variants you generate. Here is the full pipeline cost for a real workload.
Serverless wins decisively at low and medium scale. There is a point where sustained, predictable load makes containers or instances cheaper, and it is more specific than most rules of thumb suggest.
Retries are free to configure and expensive to run. Duplicate processing multiplies compute, downstream calls, and side effects. Here is what retry policy really costs and how idempotency changes it.
Archiving events is cheap. Replaying them runs your entire downstream pipeline a second time at full price. Here is what archives, retention, and a replay actually cost.
When one function calls another synchronously, you pay for both at once. Chains of waiting functions are the most expensive common anti-pattern in serverless, and they are easy to spot.
Putting a function in a VPC is free in itself. What it pulls in is not: a NAT gateway for outbound access, data processing charges, and the choice between endpoints and gateways. Here is the bill.
FIFO queues cost 25 percent more per request, but the real price difference is throughput, batching behaviour, and the downstream design ordering forces. Here is the full comparison.
A managed proxy bills per vCPU-hour of the database it fronts. A self-hosted pooler bills as a small container. Both let you run a smaller database instance, which is where the real money is. Here is the arithmetic.
Google prices Cloud SQL by vCPU and GB separately; AWS prices RDS by fixed instance shape. That single difference changes which cloud is cheaper for your particular ratio of CPU to memory. Here is the comparison at real prices.
Atlas M30 costs about $394 per month. The same three-node replica set on EC2 costs about $230 in instances. The $164 gap is not the whole story, and for most teams it is not even the important part. Here is the full accounting.
Most Redis clusters are sized by guess and run at 20 percent memory utilization. Sizing from working set, eviction policy, and replication overhead usually lets you drop two node sizes and save several hundred dollars a month.
Storage autoscaling grows your database disk automatically and never shrinks it. A one-off bulk load can leave you paying for terabytes you deleted years ago. Here is how the ratchet works and what it costs.
Manual snapshots never expire. Every pre-migration safety copy taken over five years is still billing. A typical mid-sized account holds hundreds of gigabytes of snapshots nobody could name the purpose of.
Serverless databases promise you pay only for what you use, but most of them have a floor. Understanding the minimum capacity charge is the difference between a $5 development database and a $44 one.
A landing zone makes new accounts safe and consistent. It also gives every new account a baseline bill before a single workload lands. Multiply a 120 dollar baseline by 80 accounts and the landing zone becomes a major line item. Here is how to size and trim it.
A 30 percent AWS reduction is achievable on most untouched accounts, and the order of the levers matters more than the list. Delete first, resize second, commit last. Here is the sequenced playbook with expected savings per step.
A week has 168 hours and most non-production workloads need about 45. Turning things off for the rest is the highest ratio saving in cloud. Here is the arithmetic, the implementation, and the resources that keep billing anyway.
Zombie resources are alive on the invoice and dead in production: disks with no instance, clusters with no pods, gateways with no traffic. Here is the hunt playbook, the detection query for each type, and how to delete safely.
Storage rarely spikes, it creeps, which is why it is the least audited line on most bills. Here is a five step cleanup covering tier policy, incomplete uploads, versioning, replication, and block storage, with real per GB rates.
Backups are the one cost line with no natural ceiling: a daily schedule with no expiry runs forever. Here is how to audit snapshot spend, set retention that satisfies compliance, and cut 50 to 80 percent without losing recoverability.
ARM based instances price 10 to 20 percent below their x86 equivalents and often deliver better price performance than the headline rate suggests. Here is the staged migration playbook, the workloads that port cleanly, and the ones that do not.