About Terraform AWS GitLab Runner
This Terraform module creates GitLab Runners on AWS that scale automatically and use EC2 spot instances to run builds, which the original blog post it is based on says can cut EC2 costs significantly. It is maintained by the cattle-ops community and published on the Terraform Registry.
By default the runners use the docker+machine executor, share a build cache in S3 with lifecycle rules that clear objects after a number of days, stream logs to CloudWatch and register themselves automatically. The module supports three scenarios: a single runner agent on one EC2 node that spawns spot instances through docker machine, several agents with different configurations created by instantiating the module multiple times with the cache managed outside the module, and a plain Docker runner where builds run on the same instance as the agent without auto-scaling.
Major version upgrades, such as the move to v7 and v8, have migration guidance in linked issues and pull requests. The module is written in HCL, licensed under MIT, and welcomes contributions.
Key features
- Auto-scaling GitLab runners on AWS
- EC2 spot instances for builds
- Shared S3 cache with lifecycle rules
- CloudWatch log streaming
- Automatic runner registration
- Single-agent and multi-agent setups
Good fit for
- →Cost-efficient self-managed GitLab CI on AWS
- →Scaling CI capacity with spot instances
- Built with
- HCL
- Tags
- terraform
- gitlab-ci
- aws
- spot-instances
- infrastructure-as-code
- ci-cd
- runners
Terraform AWS GitLab Runner: questions and answers
- What is Terraform AWS GitLab Runner used for?
- Terraform AWS GitLab Runner is a Terraform module that deploys auto-scaling GitLab CI runners on AWS using EC2 spot instances, an S3 cache and CloudWatch logging. It is a good fit for cost-efficient self-managed GitLab CI on AWS and scaling CI capacity with spot instances.
- Is Terraform AWS GitLab Runner open source?
- Yes. Terraform AWS GitLab Runner is open source under the MIT licence. Its source code is on GitHub at cattle-ops/terraform-aws-gitlab-runner and is written mainly in HCL.
- Is Terraform AWS GitLab Runner free?
- Yes. Terraform AWS GitLab Runner is open source, so the software itself is free to use.
- What are some alternatives to Terraform AWS GitLab Runner?
- Similar open-source tools in the CI/CD & DevOps category include RunsOn, TaskCat and CML. SaaS products in the same category include AWS CodeBuild, AWS CodeDeploy and AWS CodePipeline.
- Is Terraform AWS GitLab Runner actively maintained?
- Yes. The most recent commit to Terraform AWS GitLab Runner was on 1 October 2026, and the latest release is 9.5.2, published on 11 June 2026. The project has 628 stars on GitHub.
Open-source alternatives to Terraform AWS GitLab Runner
See all
RunsOn
CI/CD & DevOps
Self-hosted GitHub Actions runners made simple. For AWS. 10x cheaper, up to 2x faster, and
MITvs Blacksmith★ 1.4k
TaskCat
CI/CD & DevOps
Test all the CloudFormation things! (with TaskCat)
Apache-2.0★ 1.2k
CML
CI/CD & DevOps
♾️ CML - Continuous Machine Learning | CI/CD for ML
Apache-2.0vs Valohai★ 4.2k
Semaphore UI
CI/CD & DevOps
Modern UI and powerful API for Ansible, Terraform/OpenTofu/Terragrunt, PowerShell and othe
MITvs HCP Terraform★ 14k
Atlantis
CI/CD & DevOps
Terraform Pull Request Automation
Apache-2.0vs HCP Terraform★ 9.3k
Burrito
CI/CD & DevOps
🌯 Burrito is a TACoS Kubernetes Operator - "Argo CD for Terraform"
Apache-2.0vs HCP Terraform★ 756
SaaS alternatives to Terraform AWS GitLab Runner
See all
AWS CodeBuild
CI/CD & DevOps
Managed AWS build service that compiles source code and runs tests
SaaS
AWS CodeDeploy
CI/CD & DevOps
AWS service that automates application deployments to EC2, Lambda and on-premises servers
SaaS
AWS CodePipeline
CI/CD & DevOps
Managed AWS service that automates build, test and deploy release pipelines
SaaS
env0
CI/CD & DevOps
Infrastructure-as-code automation with policy controls and cost tracking
SaaS
HCP Terraform
CI/CD & DevOps
HashiCorp managed service for running Terraform with remote state and policy checks
SaaS
Spacelift
CI/CD & DevOps
Infrastructure-as-code management for Terraform, OpenTofu, Pulumi and Ansible
SaaS

