Deploy a Minecraft Server in AWS using Terrafrom
Only Pay while you Play!
- Uses an low cost AWS spot based instance
- Server doesn't run when you aren't playing!
- Lost cost of ~1 cent an hour!
Perfect for Playing with Friends!
- Scalable, robust infrastructure
- Share your personal minecraft IP address with your friends
- 🍺 Brew
- ☁️ AWS Account
brew install terraform
brew install awscli
Ensure that the parameters are set in variables.tf
aws_region
- Set region we are deploying to
- Pick the region closest to you
availability_zone
- Set availability zone
- We have to set this due to a limitations in terraform
- hashicorp/terraform-provider-aws#4869
instance_type
- Type of instance we will run on
- m5.large seems to be reasonable
time_limit
- Set how long you want to play
- Duration is in minutes
volume_id
- Volume ID where we will store the peristant data
- We will set this later
Create an AWS Access key
- Set is as the
default
profile in ~/.aws/credentials
Create an AWS Key Pair
- Name it
minecraft
Create a Volume
- 10GB should be fine
- This is where we will store all the persistant data volume_id
- Set the
volume_id
in thevariables.tf
file
terraform init
terraform apply
The output will be an IP you can connect to in Minecraft
terraform destroy
To ensure you don't encure additional costs, you can delete the volume that was created manually. This will delete all the data.