ec2-github-runner vs terraform-aws-github-runner
ec2-github-runner suits repositories that occasionally need a job to run on a specific EC2 instance type or inside a private VPC, without operating a standing autoscaler. terraform-aws-github-runner suits teams on AWS that manage infrastructure with Terraform and want GitHub Actions runners on EC2 that scale to zero. ec2-github-runner is an open-source project you run yourself for GitHub Actions; terraform-aws-github-runner is an open-source project you run yourself for GitHub Actions.
Key differences between ec2-github-runner and terraform-aws-github-runner
- Operating systems: Only terraform-aws-github-runner documents Windows and macOS.
What they have in common
- Both are open-source projects you run yourself.
- Both run GitHub Actions jobs.
- Both document Linux runners.
- Both use a virtual machine per runner.
- Both are open source.
- Both can be self-hosted.
ec2-github-runner vs terraform-aws-github-runner at a glance
| Attribute | ec2-github-runner | terraform-aws-github-runner |
|---|---|---|
| What it is | GitHub Action that starts an EC2 instance as a self-hosted runner at the start of a workflow and terminates it at the end. | Terraform module that runs GitHub Actions runners on EC2 spot or on-demand instances, scaled by Lambda functions. |
| Type | Open-source project | Open-source project |
| CI systems | GitHub Actions | GitHub Actions |
| Operating systems | Linux | Linux, Windows, macOS |
| Architectures | Not documented | x64, arm64 |
| Isolation | Each workflow run starts its own EC2 instance in your VPC and a stop job terminates it; with the optional JIT mode the runner is single-use and deregisters after one job | Each runner is an EC2 instance in your AWS account; by default runners are reused until they are idle, and in ephemeral mode each instance takes one job with a just-in-time configuration and is then terminated |
| Fresh environment per job | Not documented | Not documented |
| Hardware | Any EC2 instance type, on-demand or spot, from an AMI you provide | EC2 instance types that you list, spot or on-demand, launched through the EC2 CreateFleet API; Graviton types for arm64 and EC2 Mac dedicated hosts for the experimental macOS support |
| Performance (vendor claim) | Not documented | Not documented |
| Runner sizes | Not documented | Not documented |
| Caching | Not documented | Not documented |
| Docker layer caching | Not documented | Not documented |
| GPU | Not documented | With dynamic labels enabled, ghr-ec2 override labels can request EC2 instance requirements that include GPU accelerator types. |
| Concurrency | Not documented | The scale-up Lambda stops creating instances once the configured maximum number of runners is reached; an optional pool keeps a scheduled minimum of ephemeral org-level runners |
| Static IPs | Not documented | Not documented |
| SSH into running jobs | Not documented | Yes |
| Pricing | Free and open source; you pay for the infrastructure it runs on. | Free and open source; you pay for the infrastructure it runs on. |
| Free tier | Not documented | Not documented |
| Open source | Yes (MIT) | Yes (MIT) |
| Self-host / your cloud | Yes / Yes | Yes / Yes |
| Compliance | Not documented | Not documented |
| Regions | Not documented | Not documented |
| Company headquarters | Not documented | Not documented |
| Good fit for | Repositories that occasionally need a job to run on a specific EC2 instance type or inside a private VPC, without operating a standing autoscaler | Teams on AWS that manage infrastructure with Terraform and want GitHub Actions runners on EC2 that scale to zero |
Verified November 22, 2026 from each provider’s documentation. Performance figures are vendor claims, not our measurements.
Which should you choose?
Reasons to choose ec2-github-runner
- You want an EC2 runner that exists only for the duration of one workflow
- You need a job to reach private resources in your VPC
- You want to pick the EC2 instance type per workflow, on-demand or spot
- You do not want to deploy and operate webhooks, Lambda functions or a controller
Reasons to choose terraform-aws-github-runner
- You want runners on EC2 spot instances that scale down to zero when no workflows are active
- You manage AWS with Terraform and want the whole runner stack defined as a module
- You need Linux x64, Linux arm64 and Windows runners from one deployment through the multi-runner module
- You want to bring your own AMI, instance types and subnets
Trade-offs to check first
- ec2-github-runner: The workflow must include a stop job; otherwise the EC2 instance keeps running after the workflow finishes
- ec2-github-runner: It needs a GitHub personal access token with the repo scope and manages runners at repository level
- terraform-aws-github-runner: Enterprise-level runners are not supported; runners are registered at organization or repository level
- terraform-aws-github-runner: The maintainers describe the project as maintained on a best-effort basis
Run your slowest workflow on both before deciding. See the full ec2-github-runner profile and terraform-aws-github-runner profile, or the complete comparison.
More comparisons
- Actions Runner Controller (ARC) vs terraform-aws-github-runner
- AWS CodeBuild-hosted runners vs terraform-aws-github-runner
- Cirun vs terraform-aws-github-runner
- GARM (GitHub Actions Runner Manager) vs terraform-aws-github-runner
- HyperEnv for GitHub Actions Runner vs terraform-aws-github-runner
- RunsOn vs terraform-aws-github-runner
- terraform-aws-github-runner vs TestFlows GitHub Hetzner Runners
Frequently asked questions
Is ec2-github-runner or terraform-aws-github-runner better?
What is the difference between ec2-github-runner and terraform-aws-github-runner?
Which is open source, ec2-github-runner or terraform-aws-github-runner?
How do ec2-github-runner and terraform-aws-github-runner isolate jobs?
How does ec2-github-runner pricing compare with terraform-aws-github-runner?
Do ec2-github-runner and terraform-aws-github-runner offer GPU runners?
Where do ec2-github-runner and terraform-aws-github-runner runners run?
Sources
- github.com/machulav/ec2-github-runner
- github.com/machulav/ec2-github-runner/releases
- github.com/machulav/ec2-github-runner/blob/main/LICENSE
- github.com/github-aws-runners/terraform-aws-github-runner
- github.com/github-aws-runners/terraform-aws-github-runner/releases
- github.com/github-aws-runners/terraform-aws-github-runner/blob/main/CHANGELOG.md
- github.com/github-aws-runners/terraform-aws-github-runner/blob/main/LICENSE.md
Check before you rely on it. Products change quickly, and this page reflects public documentation as of November 22, 2026. Confirm anything that matters in the provider’s own documentation.
Cite this page
CI Runners. (2026). ec2-github-runner vs terraform-aws-github-runner. cirunners.org. Last reviewed November 22, 2026. https://cirunners.org/compare/ec2-github-runner-vs-terraform-aws-github-runner/