Migrate from EC2 Self-Hosted Runners to Managed Runners
EC2 self-hosted runners mean Lambdas, launch templates, scaling logic, and an AMI pipeline you maintain. Managed runners give you ephemeral cloud runners with none of that AWS plumbing.
A typical EC2 runner stack - often built on terraform-aws-github-runner - uses webhooks, Lambdas, and launch templates to spin ephemeral EC2 runners. It works, but it is your AWS bill plus your maintenance. Managed runners replace the stack with a label.
What changes
| EC2 self-hosted | Managed (Latchkey) |
|---|---|
runs-on: [self-hosted, ec2] | runs-on: latchkey-medium |
| You own Lambdas + launch templates | Provisioning handled for you |
| You bake and rotate AMIs | Images maintained for you |
| EC2 bill + idle/warm cost | Per-minute, ~69% under hosted |
Before and after
Before: .github/workflows/ci.yml
jobs:
build:
runs-on: [self-hosted, ec2, linux] # your EC2 fleet
steps:
- uses: actions/checkout@v4
- run: make build testManaged equivalent
After: .github/workflows/ci.yml
jobs:
build:
runs-on: latchkey-medium # no AWS plumbing
steps:
- uses: actions/checkout@v4
- run: make build testMigration steps
- Find workflows targeting your EC2 self-hosted labels.
- Connect the managed-runner provider to your org.
- Swap the label on one workflow and run in parallel.
- Confirm parity, roll out, then stop launching EC2 runners.
- Tear down the webhook/Lambda/launch-template stack.
Gotchas
- If jobs assumed an instance role for AWS access, switch to GitHub OIDC.
- Recreate AMI-baked tools as setup steps or a custom runner image.
- Keep the EC2 stack in place (not destroyed) until parallel runs prove parity.
What you gain
- Roughly 69% lower per-minute cost than GitHub-hosted runners.
- Warm pools remove queue time - jobs start almost immediately.
- Self-healing detects, fixes, and auto-retries transient and mechanical failures.
- Zero ops: no agents, autoscalers, or controllers to patch and babysit.
Key takeaways
- EC2 runners hide a Lambda + AMI maintenance burden.
- Managed runners replace that stack with a label.
- Switch IAM access to OIDC during the move.
Related guides
Migrate to Latchkey in 10 MinutesMove your GitHub Actions to Latchkey managed runners in about 10 minutes: connect the app, swap a label, and…
Migrate from Self-Hosted to Managed Runners (Drop the Ops)Retire self-hosted GitHub Actions runners for managed runners: keep the same workflows, drop the autoscaler a…
GitHub Actions Cost Calculator - Estimate & Cut Your CI BillFree GitHub Actions cost calculator: enter your monthly CI minutes and runner size to see your current bill a…
GitHub-Hosted vs Self-Hosted vs Managed Runners (2026)GitHub-hosted vs self-hosted vs managed GitHub Actions runners compared on cost, speed, maintenance, and reli…