AWS EC2 vs Azure Virtual Machines
AWS EC2 and Azure Virtual Machines are the same kind of product: plain cloud VMs with their own kernel that you set up yourself. They differ in the details. EC2 bills per second and rents Mac hosts. Azure bills per full minute, lists more regions and keeps three replicas of each managed disk.
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, and security groups control inbound traffic. You set up the agent parts yourself: agents, desktops, HTTPS URLs and key handling. AWS also sells managed agent sandboxes, Bedrock AgentCore Code Interpreter and Browser, as a separate product. EC2 serves every kind of server workload, from websites to GPU training, across AWS's worldwide regions.
Azure Virtual Machines
Azure Virtual Machines is Microsoft's general-purpose cloud VM service: you rent Linux or Windows machines by the minute in Azure regions worldwide.
It is a hyperscaler IaaS product, not a sandbox API. Each VM runs on Microsoft's Hyper-V hypervisor with its own kernel, root and SSH. You pick from hundreds of sizes, including Arm, burstable and GPU families. Networking, disks, images, firewalls and agent tooling are separate pieces that you set up. It suits teams that already run on Azure and want full control.
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. “7th cheapest of 359” means 6 of the other 358 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 | Azure Virtual Machines: price rank | boat: price rank |
|---|---|---|---|
| Software factory 100 at once · 4 vCPU / 8 GB · 2,200 sessions of 8 h a month | 118th of 365, with limits $775 a month | 114th of 365, with limits $730 a month | 5th cheapest of 365 $634 a month |
| Always-on AI employees 50 machines 24/7 · 2 vCPU / 4 GB | 177th of 361, with limits $646 a month | 176th of 361, with limits $644 a month | 6th cheapest of 361 $657 a month |
| Code interpreter bursts 100 at once · 1 vCPU / 2 GB · 200,000 sessions of 1 min a month Both clouds handle short code bursts better than boat's start limits allow, though each VM takes tens of seconds to boot. All three are a compromise here. | 106th of 336, with limits $165 a month | 118th of 336, with limits $222 a month | 189th of 336, 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 Azure comes out a little ahead of EC2 for sandboxes for your users, but on both you build the URLs, auth and cleanup yourself. boat ships that layer. | 76th of 349, with limits $607 a month | 69th of 349, with limits $500 a month | 3rd cheapest of 349 $209 a month |
| RL rollouts 1,000 at once · 2 vCPU / 4 GB · 1,000,000 sessions of 3 min a month EC2 ranks above Azure for RL rollouts once your vCPU quota is raised. Both rank above boat, whose start limits charge for or refuse starts in large bursts. All three are a compromise here. | 15th of 349, with limits $830 a month | 22nd of 349, with limits $1,039 a month | 39th of 349, with limits $2,000 a month |
| Agent evals 250 at once · 4 vCPU / 8 GB · 15,000 sessions of 20 min a month Both clouds fit agent evals fully and sit near the top: Azure at $173 a month and EC2 at $177. boat comes to $200. | 7th cheapest of 359 $177 a month | 5th cheapest of 359 $173 a month | 10th cheapest of 359 $200 a month |
| CI runners 40 at once · 8 vCPU / 16 GB · 6,000 sessions of 12 min a month Both run CI fully, EC2 at $255 a month and Azure at $335. boat comes to $86, with Docker and /dev/kvm on every sandbox. | 19th cheapest of 374 $255 a month | 33rd cheapest of 374 $335 a month | 2nd cheapest of 374 $86 a month |
| 24/7 dev boxes 1 machine 24/7 · 4 vCPU / 8 GB A 24/7 dev box is $76 a month on EC2 and $94 on Azure, and both keep billing the disk while stopped. boat is $26; a stopped boat disk is kept for at least 14 days. | 60th cheapest of 371 $76 a month | 74th cheapest of 371 $94 a month | 19th cheapest of 371 $26 a month |
| Computer-use agents 50 at once · 4 vCPU / 8 GB · 20,000 sessions of 15 min a month Neither cloud has a built-in desktop stream or computer-use API on Linux. You can install one: Amazon DCV on EC2, xfce and xrdp on Azure. boat streams a 60fps desktop on every sandbox. | 145th of 367, with limits $195 a month | 143rd of 367, with limits $192 a month | 7th cheapest of 367 $200 a month |
| Browser-use agents 50 at once · 2 vCPU / 4 GB · 30,000 sessions of 10 min a month | 232nd of 356, with limits $101 a month | 233rd of 356, with limits $107 a month | 7th cheapest of 356 $200 a month |
| Scraping & bots (startup scale) 50 at once · 1 vCPU / 2 GB · 100,000 sessions of 3 min a month | 259th of 343, with limits $116 a month | 258th of 343, with limits $116 a month | 6th cheapest of 343 $90 a month |
| Mass scraping & bots (undetectable) 1,000 at once · 1 vCPU / 2 GB · 3,000,000 sessions of 2 min a month | 85th of 327, with limits $2,046 a month | 84th of 327, with limits $2,044 a month | 73rd of 327, with limits $1,800 a month |
| Parallel red teaming 200 at once · 2 vCPU / 4 GB · 5,000 sessions of 30 min a month | 162nd of 351, with limits $45 a month | 164th of 351, with limits $46 a month | 3rd cheapest of 351 $200 a month |
| GPU eval jobs 10 at once · 8 vCPU / 32 GB · 500 sessions of 30 min a month Of these three, only AWS EC2 fits GPU eval jobs in our table, at $1,723 a month. Azure rents GPU sizes too, but has no fitting row here, and boat has no GPU. | 26th cheapest of 102 $1,723 a month | Not ranked: misses a requirement | Not ranked: misses a requirement |
| macOS agents 5 at once · 4 vCPU / 8 GB · 1,000 sessions of 20 min a month | Not ranked: misses a requirement | Not ranked: misses a requirement | Not ranked: misses a requirement |
Key features
| Feature | AWS EC2 | Azure Virtual Machines | boat |
|---|---|---|---|
| What you get | A general cloud VM; you install and wire everything else | A general cloud VM; images, networking and tooling are yours to set up | An agent sandbox: a full VM with agents, desktop, URLs and snapshots set up |
| Isolation | Nitro VM with its own kernel | Hyper-V VM with its own kernel | Full VM with its own kernel; vCPUs are shared, not dedicated cores |
| Billing | Per second for Linux and Windows, 60 second minimum | Per full minute; a VM shut down from inside the OS keeps billing until deallocated | Per second while running, from a monthly plan ($20 minimum); no compute charge while stopped |
| Nested virtualization | KVM or Hyper-V on Intel 7th/8th-gen families (C7i, M7i, R7i, C8i, M8i, R8i, X8i, I7i and variants) and metal; not on Graviton or AMD | On many Intel and AMD sizes (such as D, E and F series); not on Arm or B-series | /dev/kvm, Docker, root and systemd on every sandbox |
| Operating systems and CPUs | Linux and Windows on Intel, AMD and Graviton Arm; macOS on Mac Dedicated Hosts | Linux and Windows on Intel, AMD and Arm (Cobalt 100, Ampere Altra); no macOS | Ubuntu 24.04 x86_64 on AMD Ryzen 7 9700X and Ryzen 9 9950X hosts; Windows programs through Wine |
| GPUs | Nvidia GPU instances, from L4 and L40S up to H100 and H200 | GPU families such as NC with Nvidia H100 and A100 | No GPU on any size |
| Coding agents | You set it up: install and drive them over SSH or Systems Manager | You set it up: install and run them with Run Command, scripts or SSH | Seven harnesses installed, including Claude Code, Codex and OpenCode, with a prompt, steer and events API |
| Keeping keys out of the machine | IAM roles give the instance short-lived AWS credentials; for other API keys you set up your own proxy | Key Vault secrets are fetched into the VM, where its code can read them; you can set up your own proxy | Optional paid AI credentials proxy ($1 a day plus $1 per 1,000 requests): real keys of supported model providers stay out; other secrets still enter |
| Desktop and computer use | Linux images have no desktop by default; install one and stream it with Amazon DCV (no license fee on EC2); Remote Desktop on Windows; no computer-use API | You set it up: install a desktop such as xfce and xrdp, then open port 3389; no computer-use API | Built-in desktop and Chrome at 1920x1080, 60fps, with computer-use tools and an embeddable stream |
| Reaching the machine | Public IPv4 ($0.005 an hour), static Elastic IPs and any port through security groups; HTTPS needs your own domain, certificate and load balancer or web server | Public IPv4, static if you pay for it, and any port through security groups; HTTPS is yours to run, or you add a load balancer or gateway | HTTPS URLs on up to 50 ports, token-gated by default; SSH; no static IPv4, and the IP changes at each resume |
| Files after a stop | EBS disks kept until you delete them and billed while stopped; snapshots manual or scheduled with Data Lifecycle Manager | Disks kept and billed while deallocated; managed disks keep three replicas (at least 11 nines a year on LRS) | Disk saved every minute and at each stop; kept at least 14 days after a stop, longer with a saved snapshot |
| Fork and pause | Clone by making an image and booting a new instance; hibernation keeps memory for the same instance | Capture a gallery image (the VM stops briefly) or snapshot its disks, then boot new VMs cold; hibernation up to 64 GB of RAM on general-purpose sizes | Fork a running sandbox in one call from its last 1-minute snapshot; resume reboots from disk (no memory kept) |
| Outbound network rules | Security groups; domain allowlists with AWS Network Firewall or DNS Firewall (paid) | Security groups; domain allowlists with the paid Azure Firewall | Open internet on every plan; no provider-side allowlist |
| Regions | 39 regions and 124 availability zones | 77 regions listed as available or coming soon | Germany, Finland and France; no US or Asia region, and you cannot pick one |
Every feature Battleships tracks (43)
| Feature | AWS EC2 | Azure Virtual Machines | boat |
|---|---|---|---|
| Full VM (own kernel) | Yes | Yes | Yes |
| Docker inside | Yes | Yes | Yes |
| Nested virtualization | Yes | Yes | Yes |
| Root | Yes | Yes | Yes |
| Systemd | Yes | Yes | Yes |
| Desktop GUI | With your own setup | With your own setup | Yes |
| Browser | No documented way | No documented way | Yes |
| Computer-use API | No documented way | No documented way | Yes |
| SSH | Yes | Yes | Yes |
| Persistent disk | Yes | Yes | Yes |
| Pause/resume | Yes | Yes | Yes |
| Automatic snapshots | Yes | No documented way | Yes |
| Fork/clone | Yes | Yes | Yes |
| Live fork (no pause) | No documented way | No documented way | Yes |
| Memory fork | No documented way | No documented way | No documented way |
| Custom image (Docker or snapshot) | Yes | Yes | Yes |
| ≥24 h sessions | Yes | Yes | Yes |
| Idle auto-stop | No documented way | No documented way | No documented way |
| Wake on request | No documented way | No documented way | No documented way |
| HTTPS preview URLs | No documented way | No documented way | Yes |
| Raw TCP inbound | Yes | Yes | Yes |
| Public IPv4 | Yes | Yes | No documented way |
| Egress allowlist | Yes | Yes | No documented way |
| Secret proxy | No documented way | No documented way | Yes |
| Secret proxy for any API | No documented way | No documented way | Yes |
| Preinstalled agents | No documented way | No documented way | Yes |
| Agent harness API | No documented way | No documented way | Yes |
| MCP server | No documented way | Yes | No documented way |
| GPU | Yes | Yes | No documented way |
| Windows | Yes | Yes | No documented way |
| Arm64 | Yes | Yes | No documented way |
| Self-hosting | No documented way | No documented way | No documented way |
| BYOC | No documented way | No documented way | No documented way |
| Open source | No documented way | No documented way | No documented way |
| Scoped API keys | Not published | Not published | Yes |
| Spend limits | Not published | No documented way | Yes |
| Usage per sandbox (API) | Yes | Yes | Yes |
| Audit logs | Not published | Yes | No documented way |
| SSO | Yes | Yes | No documented way |
| SOC 2 | Yes | Yes | No documented way |
| HIPAA | Yes | Yes | No documented way |
| EU data residency | Yes | Yes | No documented way |
| Zero data retention | Not published | Not published | Yes |
Performance
Neither AWS EC2 nor Azure Virtual Machines is in the public benchmarks we use, so we cannot say which is faster. On both clouds, speed depends on the CPU family you pick. In StarSling's run of 3 October 2026 (run 37073680030), boat did 28.06 runs/s on the V8 Web Tooling Benchmark at 4 vCPU / 8 GB, second of 15. Every boat sandbox in this run ran on an AMD Ryzen 9 9950X host. boat also places some sandboxes on AMD Ryzen 7 9700X hosts, which this run did not measure.
V8 Web Tooling Benchmark at a 4 vCPU / 8 GB target, runs per second, higher is better. Source: StarSling's run of 3 October 2026 (run 37073680030), median of 5 sandboxes. Providers ran on different hardware in different regions. StarSling gives a shared rank when the run cannot separate two providers. Every boat sandbox in this run ran on an AMD Ryzen 9 9950X host. boat also places some sandboxes on AMD Ryzen 7 9700X hosts, which this run did not measure. AWS EC2 and Azure Virtual Machines are not in the public benchmarks we use, so we cannot say which is faster.
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. Start limits, per-start fees and plan minimums are in the price, boat's included.
| Scenario | AWS EC2, a month | Azure Virtual Machines, a month | boat, 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) | $26 · Pay-as-you-go subscription (no plan fee) | $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 | $48 · Pay-as-you-go subscription (no plan fee) · 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) | $1,168 · Pay-as-you-go subscription (no plan fee) | $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) | $225 · Pay-as-you-go subscription (no plan fee) | $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) | $483 · Pay-as-you-go subscription (no plan fee) · with limits | $8,800 · $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 bill on top, also while stopped. A public IPv4 address bills while the instance runs, and an Elastic IP you keep also bills while stopped. Lower rates need a 1-year or 3-year commitment.
Azure Virtual Machines: Azure bills each VM per full minute while it runs, with no plan fee. Disks, public IPv4 addresses and egress bill on top, and disks keep billing while deallocated. The lowest prices here use Arm Cobalt sizes, B-series burstable sizes, or a 3-year reservation for a machine that never stops.
Limits in those scenarios
A new AWS account can run only 5 vCPUs of standard On-Demand instances per region. Azure caps vCPUs per region and per VM family, and stopped VMs still count. So 50 agents in parallel need a quota raise on both. One agent that never stops reaches the prices shown ($51 a month on EC2, $48 on Azure) only with a 3-year commitment. For 1,000 short jobs at once, EC2 fits at $502. Azure's figure uses B-series VMs, which guarantee 30% of each vCPU on the size priced and throttle above that once credits run out. boat's limits: plans cost $20, $100, $500 or $2,000 a month, and the plan price comes back as VM time for that month only. A stopped sandbox has no compute charge, but saved snapshots above the included count and the AI credentials proxy still charge. For the same burst, boat's $2,000 plan charges for starts above 90 a minute and refuses them above 270.
| Scenario | AWS EC2 | Azure Virtual Machines | boat |
|---|---|---|---|
| One coding agent, workdays | None for this scenario | None for this scenario | None for this scenario |
| One agent that never stops |
|
| None for this scenario |
| 50 agents in parallel | None for this scenario | None for this scenario | None for this scenario |
| Sandboxes for your users | None for this scenario | None for this scenario | None for this scenario |
| 1,000 short jobs at once | None for this scenario |
|
|
Which one should you use?
Use AWS EC2 when
you need macOS, a wide range of GPU instances, per-second billing for short jobs, or your company already runs on AWS.
- macOS on Mac hosts. Useful if agents build for Apple platforms: EC2 rents Mac instances on Dedicated Hosts (24-hour minimum), and Azure has no macOS.
- Per-second billing. Useful for many short jobs: EC2 bills Linux and Windows per second after a 60 second minimum, while Azure bills per full minute.
- GPU eval jobs. Useful if you run evals on GPUs: EC2 is the one of the two that fits that use case in our table.
Use Azure Virtual Machines when
you need replicated disks, hibernation, a region in a country EC2 does not cover, Spot capacity for large batches, or your company already runs on Azure.
- Replicated disks and hibernation. Useful if disks must survive host failure: managed disks keep three replicas, and hibernation saves memory on supported sizes.
- More regions. Useful if data must stay in a given country: Azure lists 77 regions available or coming soon, against 39 for EC2.
- Spot VMs for large batches. Useful for big batches that can survive eviction: Azure Spot VMs sell spare capacity at a discount, with 30 seconds of notice.
Where boat fits
boat is not a hyperscaler. It has no GPUs, no Windows or macOS guests, and runs only in Germany, Finland and France. If you run agents, both clouds leave you to build the agent layer on a raw VM. boat gives each agent a full VM that already has that layer.
Agents driven from outside
On EC2 and Azure you install every agent over SSH, Systems Manager or Run Command, and secrets you fetch land inside the VM. boat installs seven harnesses, has a prompt and events API, and offers an optional paid credentials proxy for model provider keys.
Fork a running machine
Copying a machine on either cloud means capturing an image or snapshotting disks, then booting a new VM cold. Stopped machines keep billing their disks. boat forks a running sandbox from its last 1-minute snapshot; writes from the last minute can be missing from the fork.
Desktop, HTTPS URLs and /dev/kvm on every sandbox
On both clouds you install a desktop yourself, HTTPS needs your own certificate and load balancer, and nested virtualization works on chosen sizes. boat has a 60fps desktop, HTTPS on 50 ports and /dev/kvm on every sandbox.
Use boat when what you run is agents and you want each one on a ready full VM: coding agents with an API, a built-in desktop, HTTPS URLs, /dev/kvm, a disk saved every minute and forks, with no infrastructure to build. Compare it one to one: boat vs AWS EC2 and boat vs Azure Virtual Machines.
boat's own limits
- Plans start at $20 a month. The plan price comes back as VM time for that month. Unused time does not carry over. Source
- Starts (create, fork, resume): the $20 plan includes 12 a minute, 60 an hour and 200 a day. The $2,000 plan includes 90 a minute, 600 an hour and 2,400 a day. Extra starts cost $0.03 to $0.07. A start fails with 429 above 3 times the included starts per minute, or 6 times per hour or per day. Source
- A stopped sandbox has no compute charge. boat keeps its disk for at least 14 days. A saved snapshot keeps it longer; extra saved snapshots and the AI credentials proxy are paid. Source
- Auto-stop defaults to 1 hour. You can turn it off on a paid plan. The trial allows 2 hours at most. Source
- boat saves the disk every minute and at each stop. Memory, running programs and /tmp are not saved: a resume is like a reboot. A machine failure loses writes after the last good snapshot. Source
- Machines run in Germany, Finland and France only. Snapshot copies can be stored outside the EU. Source
- Public IPv6 and outbound IPv4. No dedicated IPv4. The IP changes at each resume. Source
- Hosts are AMD Ryzen 7 9700X and Ryzen 9 9950X. vCPUs are shared. No GPU. You cannot boot your own Docker image. Source
Questions people ask
Is AWS EC2 cheaper than Azure Virtual Machines?
It depends on the job. In our scenarios, one coding agent on workdays is $21 a month on EC2 and $26 on Azure, and 50 agents in parallel come to $944 against $1,168. Azure is lower for sandboxes for your users, $225 against $269, and for one agent that never stops, $48 against $51 with a 3-year commitment on both. On boat these four are $20, $317, $200 and $26.
Which is faster, EC2 or Azure?
We cannot say: neither is in the public benchmarks we use, and speed depends on the instance family you pick. boat did 28.06 runs/s on the V8 Web Tooling Benchmark at 4 vCPU / 8 GB in StarSling's run of 3 October 2026, on an AMD Ryzen 9 9950X host.
Can EC2 and Azure VMs run Docker and nested virtualization?
Both give you root, so Docker and systemd run on any instance. Nested virtualization depends on the size. On EC2 it works on Intel 7th/8th-gen families (C7i, M7i, R7i, C8i, M8i, R8i, X8i, I7i and variants) and metal, not on Graviton or AMD. On Azure it works on many Intel and AMD sizes such as D, E and F series, not on Arm or B-series. boat has /dev/kvm on every sandbox.
Do EC2 and Azure VMs bill while stopped?
A stopped EC2 instance stops compute billing but still bills its EBS disk and any Elastic IP you keep. On Azure, only a deallocate from the portal, CLI or API ends compute billing; a shutdown from inside the OS does not, and disks and static IPs keep billing. A stopped boat sandbox has no compute charge, but saved snapshots above the included count and the AI credentials proxy still charge.
Which has more regions?
Azure lists 77 regions as available or coming soon, and EC2 runs in 39 regions with 124 availability zones. Both have several regions in the EU. boat runs on machines in Germany, Finland and France, and you cannot pick a region.
Can I run coding agents on EC2 or Azure?
Yes. On either, you launch a VM, install the agent, give it a key and drive it over SSH, Systems Manager or Run Command. boat does that setup for you: seven harnesses are installed, and you drive them by API. With boat's optional paid credentials proxy on, real keys of supported model providers stay outside the machine.
Try boat
Install the CLI, then run boat new.
7-day free trial