Most Minecraft server hosts have a fundamental flaw: they charge a monthly subscription for a server that sits empty 90% of the time.
I realized I was paying €20/month for a server my kids and I only played on for a few hours most weekends. That was the spark for ERGamesPRO: an on‑demand Minecraft hosting platform built on AWS where the goal is simple:
If no one is playing, I shouldn’t be paying.
(By “serverless,” I mean no always-on compute: no EC2 fleet to patch, and billing for CPU/RAM stops when the server is off. Storage/mission-control costs remain, but they’re small compared to 24/7 compute.)
The Architecture: Why Fargate?
I chose AWS Fargate (ECS) to get scale-to-zero behavior without managing instances.
I chose AWS Fargate (ECS). When you click “Start” on the dashboard, the platform provisions a fresh Fargate task dedicated to that specific server. When you click “Stop,” that task is terminated and compute cost drops to zero.
High‑Level Stack
- Compute: AWS Fargate (ECS) running Docker containers on ARM64 (Graviton)
- Storage: Amazon EFS for persistent world data
- Orchestration/Billing: AWS Lambda + EventBridge
- Database: DynamoDB for user profiles and server metadata
- Authentication: Amazon Cognito
- DNS: Amazon Route 53 for per-server hostnames
Stable Join Address (No Load Balancer)
I’m not using an NLB/ALB or Cloud Map. ECS tasks run in public subnets and receive a public IP.
When a server starts, the control plane automatically updates a Route 53 record under a dedicated domain (ergamespro.click) to map a custom hostname (e.g., myserver.ergamespro.click) to that task’s public IP (TTL: 60 seconds). Players always connect via hostname, even though the underlying IP can change on restart.
The “Scale to Zero” Problem
The hardest part of an on‑demand host is knowing when to turn the lights off safely.
I built a reconciliation loop using AWS Lambda + EventBridge. Every few minutes, a watchdog Lambda checks each running server using a TCP-based Minecraft Server List Ping to read the live player count.
- If player count > 0: keep running
- If player count == 0 for 10 minutes: trigger a shutdown event
If the ping fails or times out, the watchdog fails open and retries to avoid false shutdowns. When the shutdown event fires, it stops the Fargate task and compute billing ends immediately. For idle‑heavy usage (e.g., weekend sessions), this can reduce costs by ~70–80% versus 24/7 hosting.
Challenges Along the Way
This wasn’t just connecting LEGO blocks. These were the real hurdles:
1) The 500‑Resource Limit (CDK)
I used AWS CDK (Python). As the project grew, I hit the CloudFormation hard limit of 500 resources per stack.
Solution: I split the “monolith” into 7 independent stacks (Foundation, Data, Compute, etc.). Deployments became faster, safer, and easier to reason about.
2) Startup Times & Golden Images
Fargate isn’t instant. Pulling a ~1GB image at runtime can add painful cold start time.
Solution: I built a pipeline that pre‑bakes “golden images” per Minecraft version (Vanilla, Paper, Forge) and targets ARM64 (Graviton). This was a double win: Graviton is cheaper and (for common Java Minecraft workloads) performs extremely well.
Note: heavily modded servers with 100+ mods can benefit from higher x86 clock speeds, but for Vanilla and lighter modpacks, ARM has been excellent.
3) Persistent Storage with EFS
Fargate tasks are ephemeral. When a task stops, the container filesystem disappears.
Solution: Amazon EFS with dedicated Access Points. Each server gets an isolated directory mounted into the container at /data so worlds, configs, and backups persist across restarts.
EFS runs in Bursting throughput by default (configurable to Elastic or Provisioned via environment settings). In practice, Bursting is great at small scale but doesn’t scale linearly as the number of servers grows, while Provisioned can become cost-prohibitive - so Bursting is the current default.
4) File Access (SFTP) in an Ephemeral World
On a VPS you’d SSH in and upload mods. With Fargate, there’s nothing to “SSH into” when the server is stopped.
Solution: the sidecar pattern. When a user starts a server, I launch the Minecraft container alongside an SFTP sidecar container:
- Both mount the same EFS volume
- The sidecar runs a locked‑down, chrooted SFTP service
- Credentials are generated on the fly and are ephemeral
- The SFTP endpoint is available via the same server DNS name on a fixed port (2222)
- When the task stops, the SFTP endpoint disappears too
Because client IPs are unpredictable, SFTP isn’t source-IP allowlisted. Instead, access is controlled with short-lived credentials and a locked-down SFTP configuration, and the port only exists while the task is running.
This keeps file management convenient without breaking the on‑demand model.
5) Real‑Time Console Streaming
I wanted live logs in the web dashboard.
Initially I tried Amazon Kinesis Data Streams, but the cost didn’t fit a bootstrapped project (per shard‑hour even when mostly idle).
Solution: CloudWatch Logs + WebSockets.
- Fargate streams logs to CloudWatch Logs
- A Lambda polls for new entries
- Updates are pushed to the frontend via API Gateway WebSocket connections
It’s not sub‑100ms “instant,” but the 1–2 second delay is acceptable given the major cost reduction.
The Platform Today
The result feels like a premium host but behaves like a cloud‑native app:
- Start times: ~50–90 seconds from click to joinable for light servers. ~3–4m for heavy modpacks
- Isolation: each server is its own Fargate task (no noisy neighbors)
- Cost model: you pay only for the time the server is running
What’s Next?
Next on the roadmap: multi‑region support (deploy closer to players) and support for multiple worlds per server (store multiple world directories on EFS and choose which one to boot).
The closed beta is live at ergames.pro.

I have a few invite codes left for developers and gamers who want to stress‑test the architecture - raw feedback is welcome.
If you want details on the AWS CDK structure, Lambda logic, or Fargate tuning, ask in the comments.
Top comments (1)
medium.com/@eusebioresende/i-built...