I'd been meaning to catch up on AWS for a while. Tutorials weren't sticking, so I decided to learn by building something my friends and I would actually use.
The idea came easily. 6 of us, my friends and me, wanted to play Valheim together. I was in Connecticut, one friend was in Michigan, and the rest were in India. We needed a world that stayed online no matter whose laptop was off.
I had about $140 in AWS credits and expected the whole thing to last two to four weeks. My first question was simple: how long would $30 last on an EC2 instance, and how much could we save by stopping it when nobody was playing? That one question turned into a real system design exercise.
Where should the server live?
With players on two continents, no region was perfect. Frankfurt looked like a fair middle ground, but I didn't want to trust a map. I measured latency from each of our locations, then confirmed it with actual gameplay. It held up. I named the server AWSGard (AWS + Asgard, I couldn't resist) and the world Lagheim, because naming it after the thing you're most worried about felt like good luck.
Valheim art © Iron Gate AB / Coffee Stain · AWS icons © Amazon Web Services
Small decisions, real tradeoffs
I didn't plan most of what AWSGard became. It grew one need at a time, and every step came with a choice.
- Size vs. cost: I picked a slightly bigger instance than the cheapest option for more memory headroom. A smooth game night mattered more than saving a few cents an hour.
- Always-on vs. on-demand: we only played a few hours a day, so the server ran only while we played. That meant it had to start the game on its own and save the world properly before shutting down.
- Save often vs. play smoothly: frequent saves caused tiny freezes in-game. I went back to saving every 30 minutes, accepting a slightly bigger risk in exchange for gameplay that felt better.
- Access vs. control: I wasn't always around, so two friends got the power to start and stop this one server, and nothing else. Later, when we wanted to tweak world settings, I built a small dashboard that runs one fixed action instead of giving anyone a terminal.
- Convenience vs. cost: a new IP on every boot meant re-sharing it each session, so I paid a little extra for a static one.
- Speed vs. "good enough": I looked into AWS Global Accelerator to smooth out the connection, but the Frankfurt endpoint was already good enough for how we played, so I skipped it.
The last piece came from forgetting to turn things off. An idle shutdown now stops the server after an hour with no players. If it can't tell whether anyone is online, it plays it safe and keeps running.
Learning through troubleshooting
Most of the real learning happened when things broke. A Steam library that wasn't where the server expected it. A save folder owned by the wrong user. One settings experiment that didn't stick, so I restored the world and rolled it back. None of it was glamorous, but each fix taught me to check the evidence before guessing.
The result
We finished the game. Lagheim made it all the way to the end, and a month of easy, whenever-we-wanted play came to about $30 in credits. Most of the extra cost was the Elastic IP, and it was worth it.
I came to learn AWS and left with a working cloud project, better Linux habits, and a lot of good nights with friends on the other side of the world.
Next up: Enshrouded. Same playbook. ⚔️