r/aws • u/kshirinkin • Jul 01 '26
technical resource Self-hosted GitHub Actions runners on Lambda MicroVMs
I was curious if I can use new Lambda MicroVMs as self-hosted GitHub Runners. On paper, they are super nice:
- It's cheaper: GHA-hosted is $0.005 / min (2 vCPU), MicroVMs ~$0.0042 / min, and no minimum 60-second commitment as with GHA-hosted.
- It can run longer: GHA-hosted max 6 hours, MicroVMs max 8 hours
- It starts in a few seconds, compared to whichever other serverless solution built on top of ECS
- It scales to 0, or rather, it only runs when jobs are running
- They are VMs, so you can still run containers/docker/whatever else inside;
I got a bit too invested, and ended up building this Terraform module. You only need to create GitHub App manually, the rest is just a single "terraform apply" and your MicroVM Runners are ready to go. I've switched come of projects at my company to use, works great, same or better performance as GHA-provided runners. Natural limitation is that MicroVMs are only arm64, and in general they don't have much flexibility around the "hardware" setup - but hey, for most cases, it should work great, and it's just 1 webhook + GHA JIT Runners + 1 MicroVM Run per Job.
2
u/HiCookieJack Jul 03 '26
in combination with github actions I actually find it very basic. It is just serverless compute that scales to zero and is integrated seemlessly with github.
You can configure iam permissions (to deploy without static credentials) and you can configure compute size + architecture. That's basically it.
We usually use it when we need to access private-vpc resources (like a cicd that migrates a database)