Skip to main content

What Does 'Hello World' Actually Cost on AWS vs Bare Metal? (2026)

· 10 min read

Short answer: one "hello world" container with a domain and HTTPS costs about $32 per month on AWS if you set it up carefully, and about $69 per month if you follow the default AWS tutorial. The same thing on a small Hetzner Cloud server costs €5.99 per month. Bare metal is the surprising one. A Hetzner AX42-1 costs €97.30 per month, which makes it the most expensive option here, not the cheapest.

Two results are worth explaining, and neither is what people usually say:

  1. Compute is not the expensive part on AWS at this size. In the realistic setup, the container is 15% of the bill. The other 85% is the load balancer and the NAT gateway. Those cost the same whether you serve one request per month or a million.
  2. Bare metal is not cheap. It is cheap per app. A dedicated server only pays off when you fill it. For one container it is a bad deal.

How I priced this

Here is the method first. Every rate below links to the vendor price list, and the arithmetic is shown, so you can check any line yourself.

The workload: one container running a web app, one replica, reachable on your own domain over HTTPS. No database, no background jobs, almost no traffic. This is the thing you deploy on day one to check that the pipeline works.

What I measured: list price for the simplest working setup on each platform, in Europe, for one month (730 hours). Not performance. Not a tuned setup, and not a setup with commitments.

What I left out: VAT, CloudWatch logs, your own time, and discounts from AWS Savings Plans. Savings Plans do lower the Fargate line. They do not apply to the Application Load Balancer or the NAT gateway, and that is where most of the AWS money goes here. A commitment lowers the small number, not the big one.

Rates are AWS eu-central-1 (Frankfurt) and Hetzner Falkenstein/Helsinki, as published on 3 August 2026. EUR to USD at 1.1535 (ECB reference rate, 3 August 2026).

What does one container cost on AWS Fargate?

Here are two versions. The difference between them is the interesting part.

The cheapest AWS setup that still works

Fargate on ARM. The task sits in a public subnet with its own public IP, so there is no NAT gateway.

Line itemArithmeticMonthly
Fargate ARM, 0.25 vCPU0.25 × $0.03725 × 730$6.80
Fargate ARM, 0.5 GB RAM0.5 × $0.00409 × 730$1.49
Application Load Balancer, base$0.027 × 730$19.71
Public IPv4 address$0.005 × 730$3.65
Route 53 hosted zoneflat$0.50
Data transfer outunder the 100 GB free allowance$0.00
ECR image storageunder the 500 MB free tier$0.00
Total$32.15 (about €27.87)

The container is $8.29 of that total. The load balancer alone costs more than twice as much as the container.

The setup you get from the tutorials

Fargate on x86. The task sits in a private subnet behind a NAT gateway, which is what the CDK and the console give you by default. I also added one load balancer capacity unit for real traffic.

Line itemArithmeticMonthly
Fargate x86, 0.25 vCPU0.25 × $0.04656 × 730$8.50
Fargate x86, 0.5 GB RAM0.5 × $0.00511 × 730$1.87
Application Load Balancer, base$0.027 × 730$19.71
ALB capacity units1 LCU × $0.008 × 730$5.84
NAT gateway, hourly$0.045 × 730$32.85
NAT gateway, data processing5 GB × $0.045$0.23
Route 53 hosted zoneflat$0.50
Total$69.50 (about €60.25)

The NAT gateway costs more than everything else together, including the app you want to run. Its job is to let your container reach the internet from a private subnet. For a hello world you get very little back for that money, and it is switched on by default in most getting-started guides.

Sources: AWS Price List API, AmazonECS eu-central-1 (published 7 July 2026), AWSELB eu-central-1 (20 July 2026), AmazonVPC eu-central-1 (24 July 2026), Route 53 (27 May 2026), VPC pricing, ECR pricing, EC2 on-demand pricing.

What does the same container cost on a VPS?

A Hetzner Cloud CX23 has 2 vCPU, 4 GB RAM, 40 GB disk and 20 TB of included traffic. You run Docker on it, plus Caddy for automatic TLS.

Line itemMonthly
CX23 instance€5.49
Primary IPv4€0.50
Total€5.99 (about $6.91)

That is about one tenth of the realistic AWS bill, on a machine with 8 times the RAM and 8 times the vCPU count of the Fargate task. In exchange you lose managed TLS renewal, health checks and rolling deploys. You now do those yourself. For one hello world that is maybe an afternoon of Caddy config and a systemd unit.

These prices changed recently. Hetzner raised prices on 15 June 2026, and the increases were very uneven:

PlanOldNewChange
CX23€3.99€5.49+38%
CAX11 (ARM)€4.49€5.99+33%
CPX22€7.99€19.49+144%
CCX13 (dedicated vCPU)€15.99€42.99+169%

The cheap shared-vCPU plans went up a little. The dedicated-vCPU plans almost tripled. If you remember Hetzner prices from before June, check the specific plan again before you budget with it. Sources: Hetzner price adjustment notice (last changed 8 July 2026) and Hetzner IPv4 pricing.

Is bare metal cheaper than AWS?

For one container, no.

A Hetzner AX42-1 dedicated server costs €97.30 per month plus a €49 one-time setup fee, without IPv4 (same price list). That is €112.24 in the first month and €97.30 after that. It costs more than the $69.50 AWS bill it is supposed to beat.

Bare metal wins on density, not on price. The arithmetic is simple. At €97.30 against €5.99, a dedicated server has to replace about 16 small cloud instances before it breaks even. Below that number you pay for capacity you do not use.

So the rule is:

  • 1 app: use a VPS, or a platform that bills per app.
  • A few apps: still a VPS, maybe a bigger one.
  • Dozens of apps, or heavy steady load: now bare metal is the cheap option, and the saving is large.

If someone tells you bare metal is cheaper without asking how many workloads you run, the number they give you is not useful.

Everything side by side

SetupMonthlyIn USDWhat you manage
AWS Fargate, cheapest working setup€27.87$32.15IAM, task definitions, ALB, DNS
AWS Fargate, default tutorial setup€60.25$69.50the same, plus a NAT gateway
Hetzner CX23 + IPv4€5.99$6.91the whole machine: OS, TLS, deploys, patching
Hetzner AX42-1 bare metal€97.30 (+€49 setup)$112.24 (+$56.53)the whole machine, plus hardware failure planning
Hostim sa-1-1€2.50$2.88your container

All prices exclude VAT.

Why is the AWS bill shaped like this?

Because AWS sells you separate parts, and a working web app needs about six of them. Each part is cheap on its own and does a sensible job. The load balancer is a good load balancer. The NAT gateway solves a real problem. But hello world needs all six, and the five that are not compute do not get cheaper when your traffic is zero.

That is the real lesson, and it applies no matter who you buy from. At small scale you are not paying for capacity. You are paying for fixed infrastructure. To make a small deployment cheap, do not buy that infrastructure separately. Either put it all on one machine yourself, or use a platform that spreads the cost across all its customers.

It also means the common advice to pick a smaller instance does not help here. Halving the Fargate task saves $4. Removing the NAT gateway saves $33.

We looked at the version of this problem that shows up later, when the app is real, in Cloud Rent in Action: How €50 Turns Into €200+ and Render vs Railway vs Fly.io pricing.

Frequently asked questions

Do AWS Savings Plans fix this? They lower the Fargate line. They do not apply to the Application Load Balancer, the NAT gateway or Route 53, which together are 85% of the realistic bill. A three-year commitment changes the small number, not the big one.

Can I avoid the NAT gateway? Yes. Put the task in a public subnet with a public IP, which is the cheapest setup in the table above. It saves about $33 per month and is fine for a stateless container. It is not the default, and most tutorials will not do it for you.

Does the AWS free tier cover this? Partly, and only for 12 months. New accounts get 750 hours of ALB and some Fargate allowance, so the first year is cheaper. The bill above is what you pay in month 13. That is the number to plan with.

What about Lambda instead of Fargate? For workloads that are idle most of the time, Lambda with an HTTP API gateway avoids both the ALB and the NAT gateway, and a hello world can cost close to nothing. The trade-off is a different execution model: cold starts, a 15-minute limit, and rewriting your container as a handler. Good for small services with occasional traffic. It is not a drop-in replacement for a running app.

Is €2.50 real, or is there a metered surprise? It is flat. Hostim bills per plan, not per request, per GB or per seat. The pricing model doc has the full tables. The honest trade-off is different: it is a small, founder-led platform, so weigh the track record and the support scale, not the feature list.

The short version

  • One hello world on AWS costs $32 to $69 per month. 74% to 85% of that is the load balancer and the NAT gateway, not compute.
  • The same thing on a €6 VPS is about 10 times cheaper, and you manage the machine yourself.
  • Bare metal costs €97.30 per month. It is the wrong tool for one app and the right tool for sixteen.
  • Hetzner's June 2026 price rise hit the dedicated-vCPU plans hardest (+144% to +169%). The cheap shared plans went up much less (+33% to +38%).

If you want the €6 result without spending an afternoon on Caddy and systemd, that is the gap Hostim is built to close. Push a container or a git repo, get a domain and HTTPS, and pay a flat monthly price for the plan you chose. New projects get a free 5-day trial, no card.

👉 Deploy an app on Hostim, free 5-day trial, no card

We're building Hostim.dev to make this simpler, and we are happy to answer any questions.

Last updated: August 2026. All prices were checked against vendor price lists on 3 August 2026. Prices change, so check the linked sources before you budget.