AWS EC2 vs Hetzner Cloud
AWS EC2 is a hyperscaler: per-second VMs in 39 regions, with GPUs, Windows, macOS and a large cloud around them. Hetzner Cloud rents plain Linux servers by the hour with a monthly price cap, and a server bills until you delete it, even when it is off.
The companies and products
AWS EC2
AWS EC2 is Amazon's general-purpose cloud VM service, not a sandbox product: you rent virtual servers by the second and set them up yourself.
You pick an instance type (Intel, AMD, Graviton Arm, GPU or Mac), a machine image and a network, and EC2 boots a Nitro VM with its own kernel and root access. Disks are EBS volumes, inbound traffic goes through security groups, and anything agent-specific (agents, desktops, HTTPS URLs, key handling) is yours to build. It is built for every kind of server workload, from websites to GPU training, across AWS's worldwide regions.
Hetzner Cloud
Hetzner is a German hosting company founded in 1997; Hetzner Cloud rents virtual servers, storage and networking by the hour.
A Hetzner Cloud server is a Linux VM picked from shared vCPU lines (cost-optimized CX and CAX, regular CPX) or dedicated vCPU (CCX), with local NVMe disk, a public IP and up to 20 TB of traffic in the EU. You add volumes, private networks, firewalls and load balancers, and run everything yourself through the Console, the Cloud API, the hcloud CLI or Terraform. It is general infrastructure, not an agent sandbox, so this page compares the two where they overlap: giving an agent its own Linux machine.
Which use cases each one fits
For each use case, Battleships prices every sandbox provider on the same workload and sorts them from the cheapest monthly bill up. “5th cheapest of 364” means 4 of the other 363 providers run that workload, with every feature it needs, for less. “With limits” means the provider runs it but misses something, so it is listed after every full match. Open a use case for its whole ranking and what each provider misses.
| Use case and its workload | AWS EC2: price rank | Hetzner Cloud: price rank | bochka: price rank |
|---|---|---|---|
| Software factory 100 at once · 4 vCPU / 8 GB · 2,200 sessions of 8 h a month Both give a full VM with root and Docker, but Hetzner has no nested virtualization and EC2 has it only on some instance families; bochka ships agents, HTTPS previews and forks on every machine. | 87th of 367, with limits $775 a month | 46th of 367, with limits $287 a month | 3rd cheapest of 367 $634 a month |
| Always-on AI employees 50 machines 24/7 · 2 vCPU / 4 GB Both can run an assistant around the clock, but you build the agent setup, HTTPS and backups yourself, and EC2's lowest always-on price needs a 3-year commitment. | 114th of 366, with limits $646 a month | 94th of 366, with limits $325 a month | 5th cheapest of 366 $657 a month |
| Code interpreter bursts 100 at once · 1 vCPU / 2 GB · 200,000 sessions of 1 min a month EC2 bills short runs per second, while Hetzner bills every started hour in full, so a one-minute job costs an hour; bochka's start limits make big bursts a compromise. | 102nd of 345, with limits $165 a month | 156th of 345, with limits $649 a month | 186th of 345, with limits $2,000 a month |
| Sandboxes for your users 300 at once · 2 vCPU / 4 GB · 30,000 sessions of 23 min a month | 70th of 361, with limits $607 a month | 46th of 361, with limits $314 a month | Cheapest of 361 $209 a month |
| RL rollouts 1,000 at once · 2 vCPU / 4 GB · 1,000,000 sessions of 3 min a month EC2 fits large rollouts better: it can launch big fleets once your quota is raised, while Hetzner bills each short run as a full hour and bochka caps starts per day. | 13th of 360, with limits $830 a month | 104th of 360, with limits $6,490 a month | 34th of 360, with limits $2,000 a month |
| Agent evals 250 at once · 4 vCPU / 8 GB · 15,000 sessions of 20 min a month | 5th cheapest of 364 $177 a month | 51st cheapest of 364 $1,010 a month | 10th cheapest of 364 $200 a month |
| CI runners 40 at once · 8 vCPU / 16 GB · 6,000 sessions of 12 min a month A ten-minute CI job on Hetzner is billed as a full hour and EC2 bills it per second; on both you run the runner software yourself, and bochka runs it on a full VM with Docker. | 21st cheapest of 377 $255 a month | 83rd cheapest of 377 $788 a month | 4th cheapest of 377 $86 a month |
| 24/7 dev boxes 1 machine 24/7 · 4 vCPU / 8 GB All three fit a 24/7 dev box: Hetzner has a monthly price cap, EC2 bills by the second, and bochka keeps the disk with snapshots every minute. | 59th cheapest of 368 $76 a month | 32nd cheapest of 368 $42 a month | 18th cheapest of 368 $26 a month |
| Computer-use agents 50 at once · 4 vCPU / 8 GB · 20,000 sessions of 15 min a month Neither EC2 Linux images nor Hetzner servers have a desktop or computer-use API, so you install and stream one yourself; bochka streams a 60fps desktop out of the box. | 103rd of 369, with limits $195 a month | 134th of 369, with limits $320 a month | 6th cheapest of 369 $200 a month |
| Browser-use agents 50 at once · 2 vCPU / 4 GB · 30,000 sessions of 10 min a month | 165th of 367, with limits $101 a month | 227th of 367, with limits $312 a month | 7th cheapest of 367 $200 a month |
| Scraping & bots (startup scale) 50 at once · 1 vCPU / 2 GB · 100,000 sessions of 3 min a month | 195th of 346, with limits $116 a month | 157th of 346, with limits $62 a month | 6th cheapest of 346 $90 a month |
| Mass scraping & bots (undetectable) 1,000 at once · 1 vCPU / 2 GB · 3,000,000 sessions of 2 min a month | 82nd of 338, with limits $2,046 a month | 45th of 338, with limits $1,248 a month | 71st of 338, with limits $1,800 a month |
| Parallel red teaming 200 at once · 2 vCPU / 4 GB · 5,000 sessions of 30 min a month | 108th of 360, with limits $45 a month | 114th of 360, with limits $52 a month | 2nd cheapest of 360 $200 a month |
| GPU eval jobs 10 at once · 8 vCPU / 32 GB · 500 sessions of 30 min a month Only EC2 fits: it rents Nvidia GPU instances such as H100s, and Hetzner Cloud and bochka have no GPUs. | 25th cheapest of 98 $1,723 a month | Can't run it | Can't run it |
| macOS agents 5 at once · 4 vCPU / 8 GB · 1,000 sessions of 20 min a month | Can't run it | Can't run it | Can't run it |
Key features
| Feature | AWS EC2 | Hetzner Cloud | bochka |
|---|---|---|---|
| What you get | A general cloud VM on a hyperscaler; you install and wire everything else | A general Linux VM you set up and run yourself | An agent sandbox: a full VM with agents, desktop, HTTPS URLs and snapshots set up |
| Isolation | Every instance is a Nitro VM with its own kernel | Every server is a full VM with its own kernel | Every sandbox is a full VM with its own kernel |
| Docker and nested virtualization | Docker, root and systemd on any instance; /dev/kvm only on C8i, M8i, R8i and metal instances | Root and Docker; nested virtualization is "not possible on cloud server" | Docker, root, systemd and /dev/kvm on every machine |
| CPU speed (Node.js build-and-test, 4 vCPU / 8 GB) | Not measured in the benchmark we use | 8.88 runs/s on a shared CX33; CPX and CCX were not measured | 26.69 runs/s on dedicated AMD Ryzen 9 9950X (Zen 5) hosts |
| Billing unit | Per second, with a 60 second minimum, no platform fee | Every started hour billed in full, with a monthly cap | Per second, spent from a monthly plan from $20 |
| Stopped machines | Stopping ends instance charges; the EBS disk and public IPv4 keep billing | A powered-off server bills at the full rate until you delete it | A stopped sandbox costs nothing and keeps its disk |
| Snapshots | Manual, or scheduled with Data Lifecycle Manager | Snapshots you take yourself, or daily backups in 7 slots for 20% of the server price | Automatic snapshots every minute and on stop |
| Copy and fork | Make an image and boot a new instance from it; hibernation keeps memory for the same instance | Take a snapshot, then create a new server from it (disk only) | Fork a running sandbox in one call (disk, no memory) |
| Reaching the machine | Public IPv4 ($0.005 an hour) and any port; HTTPS needs your own domain, certificate and load balancer or web server | Public IPv4 and IPv6 on any port; HTTPS needs your own certificates or a paid load balancer | HTTPS URLs for up to 50 ports, token-protected; raw TCP; own IP |
| Desktop and computer use | Linux images have no desktop; Windows instances have Remote Desktop; no computer-use API | None built in; a VNC console for admin, and you install a desktop yourself | 60fps desktop and Chromium, computer use and browser control, embeddable stream |
| Coding agents and keys | No agents preinstalled; IAM credentials and secrets are read from inside the instance | No agents preinstalled; secrets go on the server through cloud-init, files or env vars | Claude Code, Codex, OpenCode and more preinstalled with a prompt, steer and events API; AI credentials proxy keeps keys outside |
| Outbound rules | Security groups per instance; domain allowlists with AWS Network Firewall or DNS Firewall (paid) | Free Cloud Firewalls with inbound and outbound rules by IP, port and protocol | Open internet on every plan; no provider-side allowlist |
| GPUs and operating systems | Nvidia GPUs up to H100 and H200; Linux, Windows and macOS on Mac Dedicated Hosts | Linux only, no GPUs | Linux on AMD Ryzen 9 9950X, no GPUs; Wine for Windows apps |
| Regions | 39 regions worldwide, including several in the EU | Germany and Finland, plus Ashburn, Hillsboro and Singapore | EU only: Germany, Finland, France |
Every feature Battleships tracks (43)
| Feature | AWS EC2 | Hetzner Cloud | bochka |
|---|---|---|---|
| Full VM (own kernel) | Yes | Yes | Yes |
| Docker inside | Yes | Yes | Yes |
| Nested virtualization | Yes | No | Yes |
| Root | Yes | Yes | Yes |
| Systemd | Yes | Yes | Yes |
| Desktop GUI | No | No | Yes |
| Browser | No | No | Yes |
| Computer-use API | No | No | Yes |
| SSH | Yes | Yes | Yes |
| Persistent disk | Yes | Yes | Yes |
| Pause/resume | Yes | Yes | Yes |
| Automatic snapshots | Yes | No | Yes |
| Fork/clone | No | Yes | Yes |
| Live fork (no pause) | No | Yes | Yes |
| Memory fork | No | No | No |
| Custom image (Docker or snapshot) | Yes | Yes | Yes |
| ≥24 h sessions | Yes | Yes | Yes |
| Idle auto-stop | No | No | No |
| Wake on request | No | No | No |
| HTTPS preview URLs | No | No | Yes |
| Raw TCP inbound | Yes | Yes | Yes |
| Public IPv4 | Yes | Yes | No |
| Egress allowlist | Yes | Yes | No |
| Secret proxy | No | No | Yes |
| Secret proxy for any API | No | No | Yes |
| Preinstalled agents | No | No | Yes |
| Agent harness API | No | No | Yes |
| MCP server | No | No | No |
| GPU | Yes | No | No |
| Windows | Yes | No | No |
| Arm64 | Yes | Yes | No |
| Self-hosting | No | No | No |
| BYOC | No | No | No |
| Open source | No | No | No |
| Scoped API keys | Not published | Not published | Yes |
| Spend limits | Not published | No | Yes |
| Usage per sandbox (API) | Yes | No | Yes |
| Audit logs | Not published | Not published | No |
| SSO | Yes | No | No |
| SOC 2 | Yes | No | No |
| HIPAA | Yes | No | No |
| EU data residency | Yes | Yes | Yes |
| Zero data retention | Not published | Not published | Yes |
Performance
EC2 was not part of the public benchmark run we use, so it has no comparable score; its speed depends on the instance family you pick. The only Hetzner number comes from a shared CX33 at 4 vCPU / 8 GB, which did 8.88 Node.js build-and-test runs per second. bochka did 26.69 runs per second at the same size on dedicated AMD Ryzen 9 9950X hosts, about three times the CX33.
Node.js build-and-test loop at 4 vCPU / 8 GB, higher is better. Measured with the open hpc-sandbox-benchmarks suite. Hetzner Cloud measured on: Shared vCPU, Cost-Optimized (CX, Intel/AMD), EU. AWS EC2 has no published run in this suite yet, so there is no like-for-like number to compare.
Pricing in five scenarios
Each bill is priced from the providers' public price lists by the open Battleships engine, with the cheapest plan that runs the scenario.
| Scenario | AWS EC2, a month | Hetzner Cloud, a month | bochka, a month |
|---|---|---|---|
| One coding agent, workdays 4 vCPU / 8 GB, 50 GB disk, 8 hours a day, 22 days a month, files kept between days | $21 · Pay-as-you-go (no platform fee) | $3 · Pay-as-you-go (postpaid) · with limits | $20 · $20/mo |
| One agent that never stops 4 vCPU / 8 GB, 50 GB disk, running 24/7 all month | $51 · Pay-as-you-go (no platform fee) · with limits | $10 · Pay-as-you-go (postpaid) · with limits | $26 · $20/mo |
| 50 agents in parallel 50 machines of 4 vCPU / 8 GB at once, 8-hour sessions, 1,100 sessions a month, Docker inside | $944 · Pay-as-you-go (no platform fee) | $141 · Pay-as-you-go (postpaid) · with limits | $317 · $20/mo × 3 seats |
| Sandboxes for your users 2 vCPU / 4 GB, 30,000 sessions of 10 minutes a month, up to 300 at once | $269 · Pay-as-you-go (no platform fee) | $312 · Pay-as-you-go (postpaid) · with limits | $200 · $100/mo × 2 seats |
| 1,000 short jobs at once 2 vCPU / 4 GB, 1,000 at once, 3 minutes each, 200,000 jobs a month | $502 · Pay-as-you-go (no platform fee) | $2,080 · Pay-as-you-go (postpaid) · with limits | $2,000 · $2000/mo · with limits |
AWS EC2: EC2 bills each instance per second (60 second minimum) at its list rate, here the Graviton c7g sizes on demand, with no platform fee. EBS disks and public IPv4 bill on top, also while stopped, and lower rates need a 1-year or 3-year commitment.
Hetzner Cloud: Hetzner bills each server by the hour, rounding every started hour up, with a monthly cap, and keeps billing until you delete it, even when it is off. The prices here use the cheapest CX servers, which are currently out of stock; the CPX and CCX servers you can order today cost more.
Hetzner Cloud: You pick a monthly plan from $20, and all of it becomes usage credit spent per second on running sandboxes. A stopped sandbox costs nothing and keeps its disk.
Limits in those scenarios
A new AWS account can run only 5 vCPUs of standard On-Demand instances per region, so 50 agents or 300 user sandboxes need a quota raise first, and the always-on EC2 price needs a 3-year commitment. Every Hetzner scenario is priced on the CX line, which Hetzner marks as currently unavailable, and its per-project server limits are not published and are raised by a request reviewed by hand. On bochka, the 1,000-job burst does not fit: the $2,000 plan allows 90 starts a minute, 600 an hour and 2,400 a day, so the burst is queued.
| Scenario | AWS EC2 | Hetzner Cloud | bochka |
|---|---|---|---|
| One coding agent, workdays | None that bite |
| None that bite |
| One agent that never stops |
|
| None that bite |
| 50 agents in parallel | None that bite |
| None that bite |
| Sandboxes for your users | None that bite |
| None that bite |
| 1,000 short jobs at once | None that bite |
|
|
Which one should you use?
Use AWS EC2 when
you need GPUs, Windows or macOS, regions all over the world, per-second billing for big bursts of short jobs, or the rest of the AWS cloud around your servers.
- GPUs, Windows and macOS. Useful if your work needs GPUs, Windows or macOS: EC2 rents Nvidia GPU instances, Windows servers and Mac hosts.
- Regions all over the world. Useful if your users sit far from Europe: EC2 runs in 39 regions, Hetzner Cloud in six locations.
- Per-second billing for short jobs. Useful for many short runs: EC2 bills per second, while Hetzner bills every started hour in full.
Use Hetzner Cloud when
you want plain long-lived Linux servers you run yourself, with a monthly price cap, free outbound firewall rules and big dedicated machines.
- Simple servers with a monthly cap. Useful for plain long-lived servers: Hetzner bills hourly up to a monthly cap, with up to 20 TB of traffic in the EU.
- Free outbound firewall rules. Useful if a machine must reach only a few addresses: Hetzner Cloud Firewalls are free and filter outbound traffic too.
- Big dedicated machines. Useful for heavy single machines: dedicated CCX servers go up to 48 vCPU and 192 GB of memory.
Where bochka fits
EC2 and Hetzner Cloud both rent general servers, and bochka is not a general cloud. If what you are really running is agents, bochka gives each one a full VM that is ready to work, with /dev/kvm, coding agents, a desktop, HTTPS URLs and snapshots every minute, in the EU.
Nested virtualization on every machine
Hetzner says VMs inside a cloud server are not possible, and EC2 allows it only on C8i, M8i, R8i and metal instances. Agents that run emulators, Firecracker or their own VMs get /dev/kvm on every bochka machine.
Free stops, minute snapshots, fork while running
A powered-off Hetzner server bills in full until deleted, and a stopped EC2 instance still bills its disk and IPv4. On both, a copy means an image plus a fresh boot. bochka forks a running sandbox and stops for free.
Agents, desktop and keys built in
Both clouds start from an empty OS, so you install, prompt and watch every agent, add a desktop yourself, and the keys sit where any root process can read them. bochka drives agents inside from outside and keeps keys in a proxy.
Use bochka when what you run is agents and you want each on a ready full VM: /dev/kvm, coding agents with an API, keys kept outside, a desktop, HTTPS URLs, snapshots every minute, forks and stops that cost nothing. Compare it one to one: bochka vs AWS EC2 and bochka vs Hetzner Cloud.
Questions people ask
Is AWS EC2 cheaper than Hetzner Cloud?
On list prices Hetzner is lower for long-running machines: 50 agents in parallel come to $141 a month on Hetzner against $944 on EC2, and one agent that never stops to $10 against $51 (EC2 with a 3-year commitment). EC2 wins short work, since Hetzner bills every started hour: 1,000 short jobs come to $502 on EC2 against $2,080, and 300 user sandboxes to $269 against $312. The Hetzner prices use the CX line, which is currently out of stock.
Which is faster, AWS EC2 or Hetzner Cloud?
There is no direct comparison: EC2 was not part of the benchmark run we use. A shared Hetzner CX33 did 8.88 Node.js build-and-test runs per second at 4 vCPU / 8 GB, and bochka did 26.69 at the same size. Hetzner's CPX and CCX servers were not measured.
Can AWS EC2 and Hetzner Cloud run Docker and nested virtualization?
Both run Docker, since each machine is a full VM with root. EC2 supports KVM inside virtual C8i, M8i and R8i instances since February 2026, plus metal instances; Hetzner says running VMs inside a cloud server is not possible. On bochka, /dev/kvm is available on every machine.
Do I pay for a stopped server?
On EC2, stopping ends instance charges, but the EBS disk and public IPv4 keep billing. On Hetzner, a server bills at the full rate until you delete it, even when it is off. On bochka, a stopped sandbox costs nothing and keeps its disk.
Where does my data run?
EC2 runs in 39 regions worldwide, including several in the EU. Hetzner Cloud runs in Germany and Finland, and also in Ashburn, Hillsboro and Singapore, which are outside the EU. bochka runs only in the EU (Germany, Finland and France), with EU data residency.
Can I run coding agents on EC2 or Hetzner Cloud?
Yes, on either one you launch a server, install the agent, put a key on it and drive it over SSH. bochka ships Claude Code, Codex, OpenCode and more on every sandbox, with a prompt, steer and events API, and its credentials proxy keeps the real keys outside the machine.
Try bochka
Install the CLI, then run bochka new.
Product preview