Railway vs AWS AgentCore
Railway is an app platform that added Linux sandbox VMs, which run with no time cap but are destroyed when they go idle. AWS AgentCore hosts agents inside your AWS account, with 2 vCPU microVM sessions that stop after 8 hours and managed Code Interpreter and Browser tools.
The companies and products
Railway
Railway is a cloud platform for deploying web apps, servers and databases, which now also sells sandboxes and cloud agents.
Railway's main product is app hosting: you deploy services and databases as containers on its own hardware. In 2026 it added Sandboxes, isolated Linux VMs you create from the CLI or a TypeScript SDK, run commands in and destroy, and Cloud Agents, a personal VM for running a coding agent, in early access. It suits teams already hosting on Railway who want throwaway machines next to their apps.
AWS AgentCore
Amazon Bedrock AgentCore is a set of AWS services to deploy and run AI agents: a Runtime that hosts your agent code, plus built-in Code Interpreter and Browser tools.
AgentCore is not a sandbox product first. It is a hyperscaler's agent platform: you push a container image or code, and each Runtime session gets its own Firecracker microVM that you reach through AgentCore APIs. Around it sit managed tools (Code Interpreter, Browser) and services for memory, identity, gateways and evaluations, and an Instances compute type runs longer sessions on EC2 in your own account. It is built for teams who already build on AWS and want agents to stay inside their account, IAM and VPC.
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. “16th cheapest of 366” means 15 of the other 365 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 | Railway: price rank | AWS AgentCore: price rank | bochka: price rank |
|---|---|---|---|
| Software factory 100 at once · 4 vCPU / 8 GB · 2,200 sessions of 8 h a month A software factory needs machines that keep their work; Railway destroys idle sandboxes and AgentCore keeps only one storage mount, while bochka keeps the whole disk. | 51st of 367, with limits $342 a month | 100th of 367, with limits $888 a month | 3rd cheapest of 367 $634 a month |
| Always-on AI employees 50 machines 24/7 · 2 vCPU / 4 GB Railway ranks 16th and fits, since a sandbox with the idle timeout set to 0 keeps running; AgentCore needs the Instances type to outlast its 8-hour microVM lifecycle. | 16th cheapest of 366 $3,977 a month | 64th of 366, with limits $1,300 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 AgentCore ranks 7th here because Code Interpreter is built for short code runs billed on CPU used; Railway ranks 36th and also bills CPU used, but caps sandboxes per environment. | 36th cheapest of 345 $413 a month | 7th cheapest of 345 $114 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 Neither fits cleanly: Railway caps sandboxes at 100 per environment on Pro, and AgentCore sessions have no open ports for your users to reach; bochka ranks 1st. | 42nd of 361, with limits $290 a month | 210th of 361, with limits $506 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 | 78th of 360, with limits $4,450 a month | 125th of 360, with limits $8,075 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 | 108th of 364, with limits $364 a month | 33rd cheapest of 364 $650 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 AgentCore ranks 52nd and Railway 113th; neither documents Docker or /dev/kvm inside a session, which bochka has on every machine. | 113th cheapest of 377 $1,210 a month | 52nd cheapest of 377 $399 a month | 4th cheapest of 377 $86 a month |
| 24/7 dev boxes 1 machine 24/7 · 4 vCPU / 8 GB Railway fits a 24/7 dev box with SSH and no session cap; AgentCore has no SSH and resets everything outside its storage mount after a stop. | 66th cheapest of 368 $89 a month | 228th of 368, with limits $52 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 has a full desktop: Railway is headless and AgentCore Browser drives only a browser, while bochka streams a Linux desktop at 60fps. | 77th of 369, with limits $103 a month | 104th of 369, with limits $202 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 AgentCore ranks 4th with a managed Chromium that has live view and replay; Railway sandboxes are headless, so a browser agent there is a compromise. | 53rd of 367, with limits $93 a month | 4th cheapest of 367 $144 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 | 60th cheapest of 346 $570 a month | 27th cheapest of 346 $287 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 | 109th of 338, with limits $2,988 a month | 165th of 338, with limits $5,458 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 | 43rd of 360, with limits $574 a month | 62nd of 360, with limits $294 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 | Can't run it | 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 | Railway | AWS AgentCore | bochka |
|---|---|---|---|
| What it is | An app platform for services and databases, with sandbox VMs added in 2026 | An AWS agent platform: hosted agent sessions plus managed Code Interpreter and Browser tools | A sandbox platform: each agent gets its own full Linux machine |
| Isolation | Sandboxes are isolated Linux VMs; app services are containers | Firecracker microVM per Runtime session; Code Interpreter and Browser in a containerized environment | Full VM with its own kernel on dedicated AMD Ryzen 9 9950X hosts |
| Biggest machine | 8 vCPU / 8 GB on Hobby, 32 vCPU / 32 GB on Pro | 2 vCPU / 8 GB per microVM session, not adjustable; bigger EC2 types only on Instances | 8 vCPU / 16 GB on the $20 plan, 16 vCPU / 32 GB from $100 |
| Session length | No maximum while active; destroyed after the idle timeout (30 minutes by default, or never if set to 0) | Up to 8 hours per microVM lifecycle, stopped after 15 idle minutes by default; up to 14 days on Instances | No cap on paid plans; an idle sandbox stops instead of being destroyed |
| Disk, snapshots and fork | Files survive only in disk checkpoints you take; fork a running sandbox's filesystem | Only one storage mount under /mnt, up to 1 GB, in preview; EBS on Instances; no snapshots or fork | Whole disk saved every minute and on stop; fork a running sandbox with its disk |
| Docker and /dev/kvm | Root shell on Ubuntu; the sandbox docs do not mention Docker or /dev/kvm | Root inside the microVM, arm64 container images; Docker and /dev/kvm not documented | Root, Docker, systemd and /dev/kvm on every machine |
| Reaching the sandbox | Up to 10 public HTTPS domains, set only at creation; SSH and port forwarding | No open ports or SSH; reached only through AgentCore APIs with IAM or JWT | HTTPS URLs for up to 50 ports, token-protected; raw TCP; SSH |
| Private network | A sandbox can join the project's private network with your Postgres and services | VPC mode with security groups, PrivateLink and a NAT gateway for a fixed outbound IP | Open internet, no provider-side allowlist; no hosted databases |
| Browser and desktop | Headless: terminal, exec and SSH only | Managed Chromium with live view, session recording and replay, profiles and proxies; no full desktop | Full Linux desktop streamed at 60fps, with Chromium, computer use and browser control |
| Coding agents | Claude Code, Codex, OpenCode and Pi preinstalled; you run them headless through exec | AWS's managed harness built on Strands Agents, or your own agent code | Claude Code, Codex and more preinstalled, with a prompt, steer and events API |
| Keeping API keys out of the sandbox | Secrets go into the sandbox as environment variables, or are saved in a checkpoint | AgentCore Identity stores OAuth tokens and API keys and hands them to your agent code | Credentials proxy for model providers and any HTTPS API; switch a credential to another account when credits run out |
| Sandboxes at once | 50 per environment on Hobby, 100 on Pro; Enterprise can ask for more | 1,000 Code Interpreter or Browser sessions, adjustable; Runtime up to 5,000 active sessions in some regions | 100 to 2,000 by plan |
| GPUs | No | NVIDIA G-series and Inferentia2 on the Instances type | No |
| Regions | US West, US East, Amsterdam and Singapore | 17 commercial AWS regions plus GovCloud | EU only: Germany, Finland, France |
Every feature Battleships tracks (43)
| Feature | Railway | AWS AgentCore | bochka |
|---|---|---|---|
| Full VM (own kernel) | Yes | Yes | Yes |
| Docker inside | Not published | Not published | Yes |
| Nested virtualization | No | No | Yes |
| Root | Yes | Yes | Yes |
| Systemd | Not published | No | Yes |
| Desktop GUI | No | No | Yes |
| Browser | Yes | Yes | Yes |
| Computer-use API | No | Yes | Yes |
| SSH | Yes | No | Yes |
| Persistent disk | Yes | Yes | Yes |
| Pause/resume | Yes | No | Yes |
| Automatic snapshots | No | No | Yes |
| Fork/clone | Yes | No | Yes |
| Live fork (no pause) | Yes | No | Yes |
| Memory fork | No | No | No |
| Custom image (Docker or snapshot) | Yes | Yes | Yes |
| ≥24 h sessions | Yes | No | Yes |
| Idle auto-stop | Yes | Yes | No |
| Wake on request | No | Yes | No |
| HTTPS preview URLs | Yes | No | Yes |
| Raw TCP inbound | No | No | Yes |
| Public IPv4 | No | No | No |
| Egress allowlist | No | Yes | No |
| Secret proxy | No | No | Yes |
| Secret proxy for any API | No | No | Yes |
| Preinstalled agents | Yes | No | Yes |
| Agent harness API | Yes | No | Yes |
| MCP server | Yes | Yes | No |
| GPU | No | Yes | No |
| Windows | No | No | No |
| Arm64 | No | Yes | No |
| Self-hosting | No | No | No |
| BYOC | Yes | Yes | No |
| Open source | No | No | No |
| Scoped API keys | Not published | Not published | Yes |
| Spend limits | Yes | Yes | Yes |
| Usage per sandbox (API) | No | No | Yes |
| Audit logs | Yes | Yes | No |
| SSO | Yes | Yes | No |
| SOC 2 | Yes | Yes | No |
| HIPAA | Yes | Yes | No |
| EU data residency | Yes | Yes | Yes |
| Zero data retention | Not published | Not published | Yes |
Performance
There is no comparable measurement for either one: neither Railway nor AWS AgentCore has a result in StarSling's hpc-sandbox-benchmarks. bochka did 26.69 Node.js build-and-test runs per second at 4 vCPU / 8 GB. An AgentCore microVM session stops at 2 vCPU, so a like-for-like test there would need the Instances type.
Node.js build-and-test loop at 4 vCPU / 8 GB, higher is better. Measured with the open hpc-sandbox-benchmarks suite. Railway and AWS AgentCore have 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 | Railway, a month | AWS AgentCore, 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 | $16 · Hobby · with limits | $26 · Pay-as-you-go (Instances) · with limits | $20 · $20/mo |
| One agent that never stops 4 vCPU / 8 GB, 50 GB disk, running 24/7 all month | $70 · Hobby · with limits | $107 · Pay-as-you-go (Instances) · 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 | $739 · Hobby · with limits | $1,286 · Pay-as-you-go (Instances) · 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 | $223 · Pro · with limits | $423 · Pay-as-you-go · 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 | $781 · Pro · with limits | $1,615 · Pay-as-you-go (Instances) | $2,000 · $2000/mo · with limits |
Railway: Railway bills sandboxes per second at $50 per vCPU-month on CPU actually used and $50 per GB-month on memory in use, which keeps billing while a sandbox waits until it is destroyed. The Hobby ($5) and Pro ($20) fees count toward usage, and there is no published price for sandbox disk, so these bills leave disk out.
AWS AgentCore: Runtime microVMs, Code Interpreter and Browser bill per second for CPU actually used and for peak memory. The 4 vCPU shape in these scenarios is the Instances type: the EC2 on-demand price plus a 12% management fee, with EBS storage and data transfer billed by AWS on top.
AWS AgentCore: Plans start at $20 a month, and the whole fee is usage credit spent per second on running sandboxes. A stopped sandbox costs nothing and keeps its disk.
Limits in those scenarios
Railway is marked as a different kind of product in every scenario, and its bills count CPU and memory only because it does not price sandbox disk. Its Pro plan allows 100 sandboxes per environment, so 300 sandboxes for your users or 1,000 jobs at once need several environments or an Enterprise limit. AgentCore's microVM sessions stop at 2 vCPU and 8 hours, so the 4 vCPU agents here use the Instances type, and files outside the storage mount reset after a stop. AgentCore is the one that fits 1,000 short jobs at once, where bochka queues starts above 90 per minute.
| Scenario | Railway | AWS AgentCore | bochka |
|---|---|---|---|
| One coding agent, workdays |
|
| None that bite |
| One agent that never stops |
|
| None that bite |
| 50 agents in parallel |
|
| None that bite |
| Sandboxes for your users |
|
| None that bite |
| 1,000 short jobs at once |
|
|
|
Which one should you use?
Use Railway when
your app and databases already live on Railway and you want sandboxes on the same private network, with big machines, SSH and public URLs.
- Your apps and databases in one place. Useful if your app already runs on Railway: sandboxes can join the same private network as your Postgres and services.
- Bigger machines with no session cap. Useful for heavy, long jobs: up to 32 vCPU / 32 GB on Pro, and a busy sandbox runs as long as you need.
- SSH and public URLs. Useful when people need to open what the sandbox serves: SSH plus up to 10 public HTTPS domains, which AgentCore sessions lack.
Use AWS AgentCore when
your agents must stay inside your AWS account and VPC, need a GPU, or are short code and browser tasks that fit its managed tools.
- It lives inside your AWS account. Teams built on AWS keep agents behind their own IAM, VPC, security groups and PrivateLink, in 17 commercial regions.
- Managed tools for short runs. Code Interpreter and Browser bill only for CPU used, run up to 1,000 sessions at once, and Browser adds live view and replay.
- GPUs and two-week sessions. Agents that need a GPU or a session of up to 14 days can use the Instances type on EC2 in your account.
Where bochka fits
Railway and AgentCore both suit work that is short or sits next to something you already run: your Railway apps, or your AWS account. If your agents work on one machine for hours or days, installing tools, running Docker and opening a browser, look at bochka. Each agent gets a full VM that keeps its whole disk, with a desktop and an API to drive the agent from outside.
A disk that stays
Railway destroys an idle sandbox after 30 minutes by default, and AgentCore keeps only a 1 GB storage mount. Turning Railway's timeout off bills memory until you destroy it; EBS on AgentCore means running EC2 in your account.
Docker, /dev/kvm and a desktop
Neither documents Docker or /dev/kvm inside a session, so docker compose or an Android emulator is a gamble. Railway is headless and AgentCore Browser drives only a browser; bochka has all of it plus a 60fps desktop.
Agents you drive from outside, keys kept out
On Railway you run agents through exec and parse their output, with keys as environment variables; on AgentCore you write the agent code and Identity hands it the keys. bochka adds prompt, steer and events, and a credentials proxy.
Use bochka when your agents work for hours or days: a full VM that keeps its disk, with Docker, /dev/kvm, a desktop, and coding agents you drive from outside while their keys stay out. Compare it one to one: bochka vs Railway and bochka vs AWS AgentCore.
Questions people ask
Is Railway cheaper than AWS AgentCore?
In these tables Railway comes out lower in all five scenarios: one agent running all month is $70 vs $107, 50 agents in parallel $739 vs $1,286, and sandboxes for your users $223 vs $423. Railway's bills leave out disk, which it does not price, and AgentCore is the only one of the two that fits 1,000 short jobs at once. bochka comes to $26, $317 and $200 for those three.
Which is faster, Railway or AgentCore?
We cannot say: neither has a result in StarSling's hpc-sandbox-benchmarks. bochka did 26.69 runs per second there at 4 vCPU / 8 GB, while an AgentCore microVM session tops out at 2 vCPU.
Can Railway or AgentCore run Docker?
Both give you root, but neither Railway's sandbox docs nor AgentCore's docs say Docker or /dev/kvm work inside a session. bochka runs Docker and exposes /dev/kvm on every machine.
How long can a session run on Railway and on AgentCore?
A busy Railway sandbox has no maximum lifetime, but it is destroyed after its idle timeout, 30 minutes by default, unless you set it to 0. An AgentCore microVM session lasts up to 8 hours and stops after 15 idle minutes by default; the Instances type runs up to 14 days. bochka has no session cap on paid plans.
Do files survive when a sandbox stops?
On Railway, only in checkpoints you take before the sandbox is destroyed. On AgentCore, only in a storage mount under /mnt of up to 1 GB, in preview, or EBS volumes on Instances. bochka keeps the whole disk and saves it every minute.
Try bochka
Install the CLI, then run bochka new.
Product preview