This bot will allow you to start a Minecraft server given a custom AMI that will start a minecraft server on port 25565 (can be changed in terraform).
- AWS CLI installed with configured access to AWS for terraform and boto3
- A machine to run_bot.py (I am using a raspberry pi)
- Python
This is my first project applying boto3 and terraform to the real world. I only intended this for my own use so if you want to use this, you will have to change a few things:
-
Not only are AMIs region locked but the AMI I have will be deleted after I am done with this project. You will need to create your own AMI with a Minecraft server and openJDK intalled. You'll want to create a system service that will auto start the server every time the instance starts.
-
When you create an AMI, on the EBS, you should turn off delete on termination. That way when terraform destory is run it will not destroy your game files.
-
You will need to create your own AWS key pair to ssh into the instance and update the key_name attribute in main.tf.
-
Setup a discord bot and set its token to an environment variable called "DISCORD_TOKEN"
- Could futher expand on Terraform or use Ansible to create an AMI that will set up, download and automate everything for you.
- A way to automatically create and send a key pair to access the server
MIT License