{"id":18806337,"url":"https://github.com/rootfs/aws_ec2_self_host_runner","last_synced_at":"2026-04-24T16:01:52.906Z","repository":{"id":211162024,"uuid":"728373881","full_name":"rootfs/aws_ec2_self_host_runner","owner":"rootfs","description":"Create an AWS EC2 Github Action Self hosted Runner","archived":false,"fork":false,"pushed_at":"2023-12-12T20:25:11.000Z","size":29,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-05-22T01:08:24.406Z","etag":null,"topics":["aws-ec2","aws-spot-instance","ci-cd","github-actions","github-self-hosted-runner","gitops-pipeline"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rootfs.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":"2023-12-06T20:01:36.000Z","updated_at":"2023-12-12T20:25:52.000Z","dependencies_parsed_at":"2024-11-07T22:48:23.342Z","dependency_job_id":"59767b0e-f470-4ceb-b53b-d7ca5a67a8bb","html_url":"https://github.com/rootfs/aws_ec2_self_host_runner","commit_stats":{"total_commits":34,"total_committers":1,"mean_commits":34.0,"dds":0.0,"last_synced_commit":"96d25c180e2ba24a4c4f4706d8f9d51f6eb3c676"},"previous_names":["rootfs/aws_ec2_self_host_runner"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/rootfs/aws_ec2_self_host_runner","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rootfs%2Faws_ec2_self_host_runner","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rootfs%2Faws_ec2_self_host_runner/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rootfs%2Faws_ec2_self_host_runner/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rootfs%2Faws_ec2_self_host_runner/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rootfs","download_url":"https://codeload.github.com/rootfs/aws_ec2_self_host_runner/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rootfs%2Faws_ec2_self_host_runner/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32230421,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-24T13:21:15.438Z","status":"ssl_error","status_checked_at":"2026-04-24T13:21:15.005Z","response_time":64,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["aws-ec2","aws-spot-instance","ci-cd","github-actions","github-self-hosted-runner","gitops-pipeline"],"created_at":"2024-11-07T22:48:14.505Z","updated_at":"2026-04-24T16:01:52.880Z","avatar_url":"https://github.com/rootfs.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# aws_ec2_self_host_runner\nCreate an AWS EC2 Github Action Self hosted Runner\n \n # Functions \n - create an EC2 instance and register it as a Github self-hosted runner \n - support spot instance. Fall back to on-demand if no spot instance found or bid price too low. \n - auto clean runner and ec2 instance\n\n # Usage\n Create Github secrets for AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY, AWS_REGION, AWS_SECURITY_GROUP_ID, MY_GITHUB_TOKEN (PAT, must have repo admin permission) \n and use them in the workflow file:\n```yaml\n env:\n  AWS_REGION: ${{ secrets.AWS_REGION }}\n  GITHUB_TOKEN: ${{ secrets.MY_GITHUB_TOKEN }}\n  AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}\n  AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}\n  SECURITY_GROUP_ID: ${{ secrets.AWS_SECURITY_GROUP_ID }}\n  GITHUB_REPO: ${{ github.repository }}\n  AMI_ID: ${{ github.event.inputs.ami_id }}\n  INSTANCE_TYPE: ${{ github.event.inputs.instance_type }\n```  \n\n# Instructions\n\n# Define instance parameters\n\n\n| Parameter            | Description                                                                                           | Default Value                            |\n|----------------------|-------------------------------------------------------------------------------------------------------|------------------------------------------|\n| AMI_ID               | The ID of the Amazon Machine Image (AMI) to use for the instance.                                      | \"ami-0e4d0bb9670ea8db0\" (Ubuntu Server 20.04 LTS) |\n| INSTANCE_TYPE        | The type of the instance to launch.                                                                   | \"t2.micro\"                               |\n| SECURITY_GROUP_ID    | The ID of the security group to associate with the instance.                                           | Replace \"YOUR_SECURITY_GROUP_ID\" with the actual security group ID. |\n| GITHUB_TOKEN         | The GitHub token to authenticate with the GitHub API. Must have repo admin permission.                | Replace \"YOUR_TOKEN\" with the actual GitHub token. |\n| GITHUB_REPO          | The GitHub repository in the format \"owner/repo\" to clone and use.                                     | \"sustainable-computing-io/kepler-model-server\" |\n| REGION               | The AWS region to launch the spot instance.                                                            | \"us-east-2\"                              |\n| DEBUG                | Enable or disable debug mode.                                                                         | \"false\"                                  |\n| KEY_NAME             | The name of the key pair to use for the instance.                                                      | Replace \"YOUR_KEY_NAME\" with the actual key pair name. |\n| GITHUB_OUTPUT        | The name of the file to output the instance ID to. ***This is only for local test use. Don't set it in the workflow file.*** | \"github_output.txt\"                      |\n| ROOT_VOLUME_SIZE     | The size of the root volume in GB.                                                                    | 200                                      |\n| SPOT_INASTANCE_ONLY  | If true, only create a spot instance.                                                                 | \"true\"                                   |\n| CREATE_S3_BUCKET     | If true, create a S3 bucket to store the model.                                                        | \"false\"                                  |\n| BUCKET_NAME          | The name of the S3 bucket to store the model.                                                          | The bucket name is the same as the repo name with time date stamp. |\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frootfs%2Faws_ec2_self_host_runner","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frootfs%2Faws_ec2_self_host_runner","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frootfs%2Faws_ec2_self_host_runner/lists"}