logo

Self-Hosted GitHub Actions Runners on Lambda MicroVMs

Posted by fodoj |2 hours ago |2 comments

fodoj 2 hours ago[1 more]

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.