Buyer’s Guide

Cloud Cost Compared: AWS vs Cloudflare vs Fly.io

Written by Govind Kumar Lohar. Reviewed for technical accuracy by Deepak Gupta and Bhaskar Suthar on · Review panel

  • cost
  • hosting
  • aws
  • edge
  • finops

Independent buyer’s guide. No vendor paid to be included, ranked or described a particular way. Written for engineers, architects and the people who sign off on their tooling budget. Editorial policy.

This article does not contain a cost comparison table, and the reason is worth stating in the first paragraph rather than burying it. The comparison it was meant to carry was twelve months of real invoices from three providers running the same application. Those invoices do not exist yet. Publishing plausible-looking numbers in their place would take about twenty minutes and would be indistinguishable, to a reader, from the real thing.

That is exactly the problem with almost every cloud cost comparison already published. The numbers are modelled rather than billed. They come from pricing calculators fed with assumptions the author picked, and the assumptions are where the entire answer lives. Change the traffic shape and the ranking inverts. Change the object size distribution and it inverts again. A reader cannot reproduce the result because the inputs were never written down, and the author frequently did not realise which input was load-bearing.

So what follows is the methodology instead: the reference application precisely enough specified that two people would build the same thing, the meters each provider actually bills on, how to normalise those meters into comparable units, the traffic-shape assumptions that change the conclusion completely, and the line items that get left out of every comparison and then dominate the real bill. The results section is a specification of exactly what to fill in, not a table.

An honest methodology you can run against your own workload is more useful than someone else’s number anyway. Your traffic shape is not theirs, and that is the whole argument.

Key takeaways

  • Cloud cost comparisons are decided by traffic-shape assumptions, not by unit rates. Any comparison that does not publish its assumptions is not reproducible and should not move your decision.
  • The three providers meter fundamentally different things. Normalising requires converting everything to cost per unit of delivered work, not comparing line items.
  • The forgotten line items are usually the largest: inter-service transfer, NAT gateway, load balancer hours, snapshot storage, and support plans.
  • Run this against your own workload. The answer for a media-heavy consumer app and a low-traffic internal API are not merely different in magnitude, they rank the providers differently.

The reference application

A cost comparison is only reproducible if the workload is specified tightly enough that two people build the same thing. Most published comparisons describe the application in a sentence, which leaves enough freedom to produce any answer you like.

This is the specification I would hold constant across all three providers.

Shape. An HTTP API and a server-rendered web front end, backed by a relational database, with a background worker consuming a queue, a scheduled job, and an object store holding user-uploaded images served publicly through a cache.

Stateless request handling. No session state in process. Everything needed to serve a request comes from the database, the cache or the object store, so the compute tier can be scaled, replaced or relocated between providers without changing behaviour. This matters because a comparison where one deployment holds state and another does not is not comparing the same application.

Identical application code. One container image, one codebase, one set of dependencies. No provider-specific rewrites, no swapping the database for a provider-native one, no moving logic into an edge runtime on one provider and leaving it in the origin on another. The moment you optimise the application for one provider, you are comparing architectures rather than providers, which is a legitimate exercise and a different one.

Identical data. The same database size, the same row counts, the same object store contents, the same image dimensions and formats. Data volume drives storage, transfer and backup meters on all three.

Identical availability posture. Same number of compute instances, same redundancy, same backup retention, same regions. A single-instance deployment on one provider against a multi-region one on another is the most common way a comparison is silently rigged, usually without intent.

A fixed twelve-month window. Long enough to capture what short tests miss: backup and snapshot accumulation, log retention growth, support plan minimums, seasonal traffic variation, and the price changes that happen during any year.

Everything the application needs, counted. Including the things that are easy to leave off because they arrived by default: the load balancer, the outbound network path, the certificate, the log storage, the monitoring, the container registry.

Needs first-hand data: Deploy this reference application to all three providers and run it for twelve months with mirrored production traffic. Record each monthly invoice in full, broken down to the line item, along with the traffic served, bytes egressed, database size, object store size and request count for the same month. The invoices are the result; anything derived from a pricing calculator is a model, and models are what this methodology exists to replace.

Which meters each provider actually bills on

The three providers do not meter the same things, which is why a line-by-line comparison of their invoices is meaningless without a normalisation step.

AWS

AWS bills on the largest number of independent meters of the three, and the ones that dominate a bill are frequently not the ones you shopped on.

Compute meters on instance-hours by instance type, or on vCPU-seconds and memory-seconds for container and function services, with purchasing models that change the effective rate: on-demand, spot, savings plans and reserved capacity. Storage meters on provisioned gigabytes for block volumes regardless of use, on stored gigabytes for object storage by storage class, and separately on provisioned IOPS and throughput for volume types that expose those as independent dials. Requests meter separately from bytes on object storage, with different rates by operation class. Network is the meter with the most structure: internet egress priced per gigabyte by region, cross-region transfer priced per gigabyte, cross-availability-zone transfer priced per gigabyte in both directions, and transfer through managed network appliances priced per gigabyte processed on top of an hourly charge for the appliance itself.

Then there are the meters attached to things that feel like infrastructure rather than products: load balancer hours plus a capacity unit metric, NAT gateway hours plus per-gigabyte processing, snapshot storage that accrues as backups accumulate, log ingestion and log retention as separate meters, and a support plan priced as a percentage of spend with a monthly minimum.

The structural point about AWS pricing is that it is designed to make co-location cheap and movement expensive. Transfer within a region between services is largely free, transfer across a zone boundary is not, and transfer to the internet is the most expensive of all. Architectures that look internal can be paying transfer charges at every hop.

Cloudflare

Cloudflare homepage

Cloudflare bills on a different axis, because its business is a network rather than a data centre. The pattern across its products is that bandwidth is either unmetered or not charged, and the meters that remain are requests, compute duration, stored bytes and operations.

Edge compute meters on requests and on CPU time consumed, not on wall-clock time, which means waiting on a subrequest or a database query is not billed the way it would be on a function platform that meters duration. Object storage meters on stored bytes and on two classes of operation, with no charge for data transfer out at all. Key-value and database products meter on reads, writes, deletes and stored bytes. The content delivery and security products are sold as plan tiers with capability gating rather than as usage meters, with unmetered bandwidth for standard web traffic on those plans.

The consequence for a comparison is that a Cloudflare invoice has very little in it that resembles the network lines on an AWS invoice, because the thing those lines charge for is not charged here. That is a genuine structural difference and not an accounting artefact, and it is the single largest driver of divergence for egress-heavy applications. It also means the Cloudflare cost of the reference application is sensitive to request count and operation count in a way the AWS cost is not, which cuts the other way for applications with enormous numbers of tiny operations.

The constraint to be honest about: the reference application as specified does not fit the Cloudflare model without adaptation, because a long-running container with a relational database and a queue worker is not the shape that platform is built around. Adapting it means changing the architecture, which breaks the identical-code rule. Either you run the comparison with an adapted architecture and say so loudly, or you run it only for the portion of the application that maps cleanly, which is the delivery and edge tier. Both are valid; pretending the question does not arise is not.

Fly.io

Fly.io homepage

Fly.io meters closer to raw infrastructure, with a smaller set of dials than AWS and less abstraction than a platform-as-a-service.

Compute meters per machine by allocated CPU and memory, billed by the second, which means a machine that scales to zero stops billing. Persistent volumes meter on provisioned gigabytes, charged whether or not they hold data. Bandwidth meters on outbound transfer with rates varying by the region serving it, and inbound is not charged. Managed data services, where used, meter on their own compute and storage allocations.

The structural difference from AWS is that most of the connective infrastructure that carries its own meter there is either included or absent here. There is no separate load balancer hourly charge, no NAT gateway processing meter, and private networking between your own instances is not billed as transfer. Fewer meters makes the bill easier to predict and also means fewer dials to optimise when it is too high.

The structural difference from Cloudflare is that this is real compute with a real filesystem, running for as long as you want it to, which is why the reference application deploys onto it without adaptation. Multi-region deployment is a configuration choice, and the cost of it is linear in machines rather than in a new set of transfer meters.

Normalising three different meters

You cannot compare these invoices line by line, because the lines do not correspond. What you compare is cost per unit of delivered work, and constructing that ratio correctly is most of the methodology.

Choose the denominator from the application, not the provider. For the reference application the right denominators are: cost per thousand API requests served, cost per gigabyte of image data delivered to users, cost per million background jobs processed, and cost per gigabyte-month of data retained. Each of those is a thing the application does, and each is measurable identically on all three providers from your own telemetry rather than from the bill.

Attribute every line to a denominator. Every charge on every invoice must be assigned to one of those buckets, including the awkward ones. Load balancer hours attribute to request serving. NAT gateway processing attributes to whatever traffic flows through it, which usually means splitting it. Snapshot storage attributes to retention. Support plan cost attributes proportionally across everything, which is the honest treatment even though it is the one everybody skips.

Hold the availability posture constant, or price the difference explicitly. If one provider requires two instances to achieve what another does with one, that is a real cost difference and belongs in the comparison. If you gave one provider two instances out of habit, that is a methodology error. The test for which it is: write down the availability target first, then show how each deployment meets it.

Convert commitment to effective rate. Reserved capacity, savings plans and committed-volume discounts change the effective unit rate substantially, and they carry a term commitment that is itself a cost in optionality. Compare both ways: fully on-demand for the true elastic case, and at your realistic commitment level for the decision you would actually make. Comparing one provider’s committed rate against another’s on-demand rate is the most common way these articles reach a predetermined conclusion.

Normalise compute to delivered throughput, not to allocated resources. A vCPU on one provider is not a vCPU on another. Comparing cost per allocated vCPU-hour assumes they do equal work, which they do not. The honest normalisation is cost per unit of application throughput at a fixed latency target, measured from your own load testing, which folds the performance difference into the cost comparison where it belongs.

Needs first-hand data: Before comparing any invoices, run identical load tests against all three deployments and record the throughput each sustains at your target p95 latency, with the resource allocation held constant in cost terms rather than in vCPU terms. Without that measurement you are comparing resource prices, not costs, and a cheaper resource that does less work is not cheaper.

The traffic-shape assumptions that change the answer completely

This is the section every published comparison skips, and it is the one that determines the outcome. Four variables dominate.

Egress-to-compute ratio. The single most decisive variable. An application serving large media to the public internet has a bill dominated by transfer, and a provider that does not meter transfer wins by a margin no compute efficiency can close. An internal API serving small JSON responses has a bill dominated by compute, where transfer is a rounding error and the ranking is set by how efficiently each provider lets you allocate CPU. These are not the same comparison and must not be reported as one number.

Burstiness. Steady, predictable load favours committed capacity and reserved pricing, where per-second scale-to-zero billing offers nothing to win. Spiky load with long idle periods favours per-second billing and scale to zero, where reserved capacity means paying for idle. The ratio of peak to mean is the number to record, and a comparison run against smoothed average traffic systematically favours the reserved-capacity provider.

Object size distribution. Many small objects load request and operation meters. Fewer large objects load byte meters. A provider that charges for operations and not for bytes is cheap for the second and expensive for the first, and the crossover is a property of your actual size histogram rather than of your total volume.

Geographic distribution of users. Transfer rates vary by serving region on providers that meter transfer. A globally distributed audience pays different effective rates than a single-country one, and a multi-region deployment to serve that audience multiplies the instance count on providers that bill per machine. Where your users are changes both the numerator and the denominator.

The honest presentation of a comparison built this way is not one table. It is a table per traffic profile, with the profile’s assumptions stated above it, and an explicit statement of which profile the reader should match themselves to. That is less satisfying than a single winner and it is the only form of the result that is true.

The line items that get left out

Every cloud cost comparison I have read omits some of these, and collectively they are frequently larger than the compute line that the comparison focused on.

Transfer between your own services. Two services in the same region but different availability zones pay transfer charges in both directions on AWS. An application split into several services chatting over the network can pay more for the conversation than for the compute having it. This charge is invisible in architecture diagrams and obvious in invoices.

NAT gateway. Private instances reaching the internet route through a managed gateway that charges an hourly rate plus a per-gigabyte processing fee on everything passing through, on top of the egress charge for the same bytes. Container image pulls, package installs, third-party API calls and telemetry exports all flow through it. It is a frequent top-five line item on AWS bills and it appears in no comparison article.

Load balancer hours. Charged per hour for existence plus a capacity metric for use. Small applications pay a meaningful fixed cost just to have one, which distorts comparison against providers that include routing.

Snapshot and backup storage. Grows monotonically with retention policy and is easy to forget because nobody looks at it until it is large. A twelve-month window captures this; a one-month test does not, which is precisely why the window has to be a year.

Log ingestion and retention. Metered separately from each other on most providers. Verbose logging at scale produces a line item that surprises teams who think of logs as free. Retention policy is the lever and nobody sets it on day one. The log management decision is part of the cost model, not adjacent to it.

Support plans. Priced as a percentage of spend with a monthly minimum. At low spend the minimum dominates; at high spend the percentage does. Either way it belongs in the comparison, because you cannot run production on a provider whose support plan you declined.

Data retrieval and early deletion charges. Colder storage classes charge for retrieval and impose minimum storage durations. Aggressive tiering that looks cheap in the storage line generates charges in the retrieval line and early-deletion penalties that are genuinely hard to predict.

Idle and orphaned resources. Unattached volumes, unreleased addresses, forgotten test environments, old snapshots. These are not really a provider difference, but they are a real component of every real invoice, and a comparison run on a clean deployment underestimates what the same provider will cost your actual organisation.

The cost of your own time. Not on any invoice and the largest number in several of these comparisons. A provider that needs a platform team to operate is more expensive than one that does not, by an amount that dwarfs the compute difference for most teams. Measuring it honestly means recording hours spent on infrastructure work during the trial window.

Mistakes that make a cloud cost comparison meaningless

Beyond omissions, these are the methodology errors that invalidate a result entirely.

Comparing different architectures and calling it a provider comparison. Optimising the application for each provider’s strengths is a reasonable exercise and produces a different conclusion than running identical code. Both are legitimate. Reporting one as the other is not.

Using list prices when nobody pays list prices. At meaningful spend, enterprise agreements and committed-use discounts change effective rates. A comparison using published rates describes the experience of a small customer, which is fine if you say so.

Measuring over too short a window. A month misses backup accumulation, log growth, seasonal variation and support minimums. It also misses the failure modes that cost money: the incident that scaled something up and nobody scaled it back down.

Averaging away the peak. Cost is driven by peak capacity on providers that bill for provisioned resources and by total work on providers that bill per second. Averaging traffic before modelling erases exactly the variable that separates them.

Ignoring the exit cost. The cost of leaving a provider is dominated by egress for your stored data, and it is asymmetric across these three. A comparison that ignores it undervalues providers that do not charge to get your data back out, and that is a real component of the decision even if you never exercise it. The same argument appears in the object storage comparison and it applies equally here.

Not publishing the inputs. If a reader cannot see the traffic profile, the availability posture, the commitment level and the region set, they cannot tell whether your answer applies to them. It usually does not.

Results

The results section of this article is a specification rather than a table, for the reason given at the top.

Needs first-hand data: Publish, for each of the three providers and each traffic profile, the following from real invoices covering a full twelve months: total cost, cost broken down by meter category, cost per thousand API requests, cost per gigabyte delivered, cost per million background jobs, and cost per gigabyte-month retained. Alongside each, publish the inputs: peak-to-mean traffic ratio, egress-to-compute ratio, object size histogram, geographic distribution, availability posture, commitment level, and hours of engineering time spent operating each deployment. Without those inputs published, the outputs are not reproducible and should not be published either.

How to choose

You do not need twelve months of invoices to make a decision. You need to know which variable dominates your bill, and that you can determine quickly.

Work out your egress-to-compute ratio first. Take your current bandwidth served and your current compute spend. If transfer dominates, providers that do not meter transfer will win and no amount of compute tuning will change that. If compute dominates, transfer pricing is close to irrelevant and you should be comparing how efficiently each provider lets you allocate and scale it.

Then work out your peak-to-mean ratio. Flat traffic means committed capacity is cheaper and scale-to-zero buys nothing. Spiky traffic with long troughs means per-second billing and scale-to-zero buy a great deal, and reserved capacity is a bet you will lose.

Then count the fixed costs. Load balancer hours, gateway hours, support plan minimums and provisioned volumes are charged whether or not you serve a request. For a small application these fixed costs can exceed the variable ones, which is why the cheapest provider for a large deployment is frequently not the cheapest for a small one.

Then price your own time. If a provider requires expertise you do not have, its true cost includes acquiring that expertise or the incidents caused by lacking it. This is the term that most often reverses a decision made on unit rates alone, and it is the one you can assess honestly in a two-week trial by counting the hours.

Then run the trial on your own workload. One month, mirrored traffic, all three, every meter recorded. That produces an answer for you that no published comparison can, including this one. The broader platform trade-offs beyond cost are covered in the hosting platform comparison, and cost should be the last filter applied rather than the first.

Decision inputHow to measure itWhich provider shape it favours
Egress-to-compute ratioBytes served divided by compute spendHigh ratio favours unmetered transfer
Peak-to-mean traffic ratioPeak hour divided by mean hourHigh ratio favours per-second and scale-to-zero
Object size distributionHistogram of response and object sizesMany small objects load request meters
Fixed infrastructure costHourly charges independent of trafficLow traffic favours fewer fixed meters
Engineering hoursHours logged on infrastructure workComplexity favours the simpler platform
Exit costStored bytes times egress rateFree egress lowers lock-in materially

Frequently asked questions

Why not just publish estimated numbers with a disclaimer?

Because the disclaimer does not travel. Numbers get screenshotted, quoted and pasted into decision documents without the caveat, and a modelled figure becomes a cited fact within a week. More importantly, a modelled comparison encodes the author’s assumptions about traffic shape, and those assumptions determine the outcome entirely. Publishing the methodology lets you substitute your own assumptions, which produces an answer that is actually about your application.

Is AWS more expensive than the alternatives?

For some workloads, substantially, and for others it is the cheapest of the three. Internet egress pricing makes it expensive for media-heavy public delivery and that is the case people generalise from. For a compute-heavy workload with modest egress, especially one using committed-use discounts and spot capacity, the arithmetic is different and frequently favours it. The question is not which provider is cheaper but which meter dominates your bill.

How long does a cost comparison need to run?

Twelve months to capture everything, one month to get a usable answer. A one-month test misses backup and snapshot accumulation, log retention growth, support plan minimums, seasonal variation and the cost of incidents. If you only have a month, run it and then explicitly add estimates for the accumulating meters rather than reporting the month as if it were representative.

What is the single most commonly missed cost?

Network transfer between your own services, followed closely by the managed gateway that private instances use to reach the internet. Both are invisible in architecture diagrams, both scale with traffic, and neither appears in published comparisons. On a service-oriented deployment they can exceed the compute line. The way to find them is to read a real invoice at full line-item detail rather than at the summary level.

Should cost be the primary factor in choosing a platform?

No, and treating it that way produces expensive decisions. Operational fit, what you can actually run, and how much engineering time the platform consumes all outweigh unit rates for most teams. Cost matters as a constraint and a tiebreaker, applied after you have established that a platform can run your application in the shape you need. The broader comparison starts from capability, which is the right order.