This project sets up a discord player bot on an AWS EC2 Ubuntu instance using Terraform.
- Terraform installed
- AWS credentials configured
- SSH key pair for EC2 instance access
- Discord invite link
- Discord app id/bot token (can be found here)
- Discord user ID (directions to obtain your user ID can be found here)
- Youtube credential string (see instructions here) USE A BURNER ACCOUNT! DO NOT USE YOUR MAIN ACCOUNT!
-
Clone the repository.
-
Update
terraform.tfvars
with your values. -
Initialize Terraform:
terraform init
-
Apply the Terraform configuration:
terraform apply
-
Invite the bot to your Discord server by clicking on the invite link in the Terraform output.
-
Check the deployment by SSHing into the EC2 instance using the output public IP:
ssh -i <path-to-ssh-key> ubuntu@<public-ip>
NOTE: it may take a few minutes for docker to install and the bot to start up after the instance is created. See cloud init logs in
tail -f /var/log/cloud-init-output.log
for progress on the user data script.