{"id":17146152,"url":"https://github.com/codenamev/twilio-aws-minecraft","last_synced_at":"2025-07-27T09:33:53.208Z","repository":{"id":137375975,"uuid":"258895525","full_name":"codenamev/twilio-aws-minecraft","owner":"codenamev","description":"Control a minecraft server in AWS via Twilio SMS","archived":false,"fork":false,"pushed_at":"2020-04-30T13:53:52.000Z","size":1394,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-29T15:50:41.596Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/codenamev.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-04-25T23:29:54.000Z","updated_at":"2024-09-16T15:29:59.000Z","dependencies_parsed_at":null,"dependency_job_id":"311dbb02-12b6-44a2-b426-da7785901fae","html_url":"https://github.com/codenamev/twilio-aws-minecraft","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codenamev%2Ftwilio-aws-minecraft","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codenamev%2Ftwilio-aws-minecraft/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codenamev%2Ftwilio-aws-minecraft/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codenamev%2Ftwilio-aws-minecraft/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/codenamev","download_url":"https://codeload.github.com/codenamev/twilio-aws-minecraft/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245250927,"owners_count":20584797,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-14T21:07:57.754Z","updated_at":"2025-03-24T10:25:46.479Z","avatar_url":"https://github.com/codenamev.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Twilio EC2 Manager\n\nThis allows managing an EC2 instance via Twilio SMS\n\n## Set up\n\n### Requirements\n\n- [Python](https://www.python.org/)\n- A Twilio account (with phone number setup to receive SMS) - [sign up](https://www.twilio.com/try-twilio)\n- An AWS account - [sign up](https://aws.amazon.com/)\n- Minecraft Server - [download](https://www.minecraft.net/en-us/download/server/)\n\n### Pre-requisites\n\n1. [Get a Minecraft Server running on an EC2 instance](https://medium.com/exampro/2018-modded-minecraft-server-on-aws-part-1-run-a-modded-minecraft-server-on-aws-ec2-instance-b37290462d8d)\n2. [Setup a Lambda function to receive SMS from Twilio](https://www.twilio.com/docs/sms/tutorials/how-to-receive-and-reply-python-amazon-lambda)\n\nWith the above in place, you should have a working Minecraft Server running in EC2, and a simple Lambda setup with the API Gateway to receive events from Twilio.\n\n### Lambda Environment Variables\n\nMake sure to add the following environment variables to your Lambda function:\n\n| Key                   | Description                                                                                                                                                                    |\n| --------------------- | ---------------- |\n| ADMIN_NUMBERS         | A comma delimited list of administrator phone numbers (e.g. `+12125552368,+12125551234`)                                                                                       |\n| TWILIO_ACCOUNT_SID    | Your primary Twilio account identifier - find this [in the Console](https://www.twilio.com/console).                                                                           |\n| TWILIO_AUTH_TOKEN     | Used to authenticate - [just like the above, you'll find this here](https://www.twilio.com/console).                                                                           |\n| EC2_INSTANCE_ID       | The ID of the EC2 Instance you created above. [You can find it here](https://console.aws.amazon.com/ec2/v2/home).                                                              |\n| EC2_REGION            | The region your EC2 instance is running in (e.g. `us-east-1b`)                                                                                                                 |\n| EC2_SECURITY_GROUP_ID | The ID of the security group that is assigned to the EC2 Instance (e.g. `sg-1234567ab89cd0987`)                                                                                |\n| TWILIO_NUMBER         | the Twilio phone number you setup to receive SMS (e.g. `+12125552368`, also found in your [Twilio Console](https://www.twilio.com/console))                                    |\n| MINECRAFT_HOST        | The server domain or IP that points to your Minecraft Server (e.g. `minecraft.example.com`)                                                                                    |\n| MINECRAFT_PORT        | e.g. `25565`                                                                                                                                                                   |\n| REQUEST_URL           | The API Gateway endpoint you setup for the Lambda function and added as the SMS incoming webhook (e.g. `https://1somehash23.execute-api.us-east-1.amazonaws.com/prod/message`) |\n\n### Lambda permissions\n\nYou will have to add the following actions to the permissions for your Lambda function:\n\n| Action                              | Description                                             |\n| ----------------------------------- | ------------------------------------------------------- |\n| `ec2:AuthorizeSecurityGroupIngress` | Allows adding new IPs to the server whitelist           |\n| `ec2:DescribeInstanceStatus`        | Allows checking the status of the instance              |\n| `ec2:DescribeSecurityGroups`        | Allows looking for existing IPs in the server whitelist |\n| `ec2:RevokeSecurityGroupIngress`    | Allows removing a whitelisted IP from the server        |\n| `ec2:StartInstances`                | Allows starting the instance                            |\n| `ec2:StopInstances`                 | Allows stopping the instance                            |\n| `logs:CreateLogStream`              | Allows capturing output to logs                         |\n| `logs:PutLogEvents`                 | Allows saving log events                                |\n\n### Package the twilio-aws-minecraft Lambda script\n\nThis will create a packaged Lambda script with all required libraries in .zip file that you can upload to replace the existing Lambda script you created in\nthe previous step.\n\n```bash\ngit clone https://github.com/codenamev/twilio-aws-minecraft.git \\\ncd twilio-aws-minecraft \\\nzip -r twilio_function.zip ./\n```\nOnce you've saved the newly uploaded Lambda and deployed, you can test out your new EC2 manager by sending a command via SMS to your new Twilio EC2 Manager!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodenamev%2Ftwilio-aws-minecraft","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcodenamev%2Ftwilio-aws-minecraft","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodenamev%2Ftwilio-aws-minecraft/lists"}