Skip to content

Archives

Links for 2021-09-07

  • doctorray117/minecraft-ondemand

    ‘Almost-free serverless on-demand Minecraft server in AWS’:

    Instead of paying a minecraft hosting service for a private server for you and your friends, host it yourself. By utilizing several AWS services, a minecraft server can automatically start when you’re ready to use it, and shut down when you are done. The final cost will depend on use but can be as little as a a dollar or two per month. The cost estimate breakdown is below. This is a reasonably cost effective solution for someone that doesn’t need their server running 24/7. If that’s you, read on! The process works as follows: Open Minecraft Multiplayer, let it look for our server, it will time out. The DNS lookup query is logged in Route 53 on our public hosted zone. CloudWatch forwards the query to a Lambda function. The Lambda function modifies an existing ECS Fargate service to a desired task count of 1. Fargate launches two containers, Minecraft and a watchdog, which updates the DNS record to the new IP The watchdog optionally sends a text message through Twilio when the server is ready. Refresh Minecraft server list, server is ready to connect. After 10 minutes without a connection or 20 minutes after the last client disconnects (customizable) the watchdog sets the desired task count to zero and shuts down.
    This is a very neat hack, actually quite potentially usable, and a good illustration of how viable Fargate+EFS are at hosting transient but not transitory workloads!

    (tags: minecraft fargate efs aws lambda hacks hosting)