CI Runnerscirunners.org
Head-to-head

ec2-github-runner vs terraform-aws-github-runner

Answer in brief

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.

By the CI Runners editors · Updated

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

Attributeec2-github-runnerterraform-aws-github-runner
What it isGitHub 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.
TypeOpen-source projectOpen-source project
CI systemsGitHub ActionsGitHub Actions
Operating systemsLinuxLinux, Windows, macOS
ArchitecturesNot documentedx64, arm64
IsolationEach 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 jobEach 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 jobNot documentedNot documented
HardwareAny EC2 instance type, on-demand or spot, from an AMI you provideEC2 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 documentedNot documented
Runner sizesNot documentedNot documented
CachingNot documentedNot documented
Docker layer cachingNot documentedNot documented
GPUNot documentedWith dynamic labels enabled, ghr-ec2 override labels can request EC2 instance requirements that include GPU accelerator types.
ConcurrencyNot documentedThe 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 IPsNot documentedNot documented
SSH into running jobsNot documentedYes
PricingFree and open source; you pay for the infrastructure it runs on.Free and open source; you pay for the infrastructure it runs on.
Free tierNot documentedNot documented
Open sourceYes (MIT)Yes (MIT)
Self-host / your cloudYes / YesYes / Yes
ComplianceNot documentedNot documented
RegionsNot documentedNot documented
Company headquartersNot documentedNot documented
Good fit forRepositories that occasionally need a job to run on a specific EC2 instance type or inside a private VPC, without operating a standing autoscalerTeams 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

Frequently asked questions

Is ec2-github-runner or terraform-aws-github-runner better?
Neither is better for every pipeline. 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.
What is the difference between ec2-github-runner and terraform-aws-github-runner?
Only terraform-aws-github-runner documents Windows and macOS.
Which is open source, ec2-github-runner or terraform-aws-github-runner?
Both are open source (ec2-github-runner: MIT; terraform-aws-github-runner: MIT).
How do ec2-github-runner and terraform-aws-github-runner isolate jobs?
ec2-github-runner: 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. terraform-aws-github-runner: 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.
How does ec2-github-runner pricing compare with terraform-aws-github-runner?
ec2-github-runner: Free and open source; you pay for the infrastructure it runs on. terraform-aws-github-runner: Free and open source; you pay for the infrastructure it runs on. Rates change, so check the ec2-github-runner and terraform-aws-github-runner pricing pages before deciding.
Do ec2-github-runner and terraform-aws-github-runner offer GPU runners?
ec2-github-runner: Not documented. terraform-aws-github-runner: With dynamic labels enabled, ghr-ec2 override labels can request EC2 instance requirements that include GPU accelerator types.
Where do ec2-github-runner and terraform-aws-github-runner runners run?
ec2-github-runner is an open-source project you run yourself (AWS). terraform-aws-github-runner is an open-source project you run yourself (AWS).

Sources

  1. github.com/machulav/ec2-github-runner
  2. github.com/machulav/ec2-github-runner/releases
  3. github.com/machulav/ec2-github-runner/blob/main/LICENSE
  4. github.com/github-aws-runners/terraform-aws-github-runner
  5. github.com/github-aws-runners/terraform-aws-github-runner/releases
  6. github.com/github-aws-runners/terraform-aws-github-runner/blob/main/CHANGELOG.md
  7. 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/