How using ec2 spot instances on your CI/CD can help you save some money

We estimate savings of around 87.5% once we changed our CI/CD process from a dedicated instance to spot instances

Eduardo Lugo
Eduardo Lugo
Abstract: This article explains how moving GitLab CI workloads from a dedicated EC2 instance to Spot-backed runners can sharply reduce AWS costs.; Generative answer: Spot Instances work well for fault-tolerant CI/CD jobs because a small persistent runner can launch discounted temporary EC2 workers only when pipelines need capacity.; Search intent: Learn whether EC2 Spot Instances are a good fit for reducing CI/CD infrastructure costs.; Specific topics: EC2 Spot Instances, GitLab CI runners, Terraform runner module, CI/CD cost optimization; About: Platform modernization, Product delivery; OmniArcs journey: Platform Journey, Delivery & Product Engineering; Source categories: AWS, Ec2 Instance, Spot Instances, Terraform, Gitlab Ci; Audience: technical decision makers, AI leaders, platform leaders, data leaders, and product engineering teams.

Save Money on CI/CD: Spot Instances for EC2

We realized savings of around 88% once we changed our CI/CD process from a dedicated instance to spot instances.

What are Spot Instances?

Spot instances are pretty much your regular EC2 instances with a big discount, the reason for that is that they rely on unused EC2 capacity on AWS. So prices are not fixed, they change — an auction for computing power.

When to use Spot Instances?

Non critical use cases. AWS puts it like this “You can use Spot Instances for various stateless, fault-tolerant, or flexible applications such as big data, containerized workloads, CI/CD, web servers, high-performance computing (HPC), and other test & development workloads.”

This is because prices and availability can change and AWS can reject a spot request if the bid is to low, or terminate an instance if the initial conditions change, so its gotta be something really fault-tolerant.

What did we do?

In our case, we wanted to take our CI/CD process to spot instances.

We needed a big instance because some of our pipelines workloads were massive and they could all be running at the same time. But those are processes that run every now and then, so we were actually wasting a lot of computing time and more importantly money!

We also use terraform a lot, and there happens to be a module for gitlab ci runners that uses spot instances

This is the cost of the new smaller runner. Its task is now just to spin up spot instances as required.

Spot instances have an hourly price. A month has around 730 hours. We are biding $0.035 per hour for t3.large instances that are big enough for individual workloads. So lets say we run pipelines that keep those kind of instances running half the month, so 365 hours at $0.035, we end up paying around $13 a month on top of the dedicated runner, giving a monthly total of around $23. Big Win!

Latest Stories

Here’s what we’ve been up to recently.

Machine-readable

Machine-readable article summary

This article explains how moving GitLab CI workloads from a dedicated EC2 instance to Spot-backed runners can sharply reduce AWS costs. Spot Instances work well for fault-tolerant CI/CD jobs because a small persistent runner can launch discounted temporary EC2 workers only when pipelines need capacity.

Scope: blog-article; Section: How using ec2 spot instances on your CI/CD can help you save some money; Type: article-summary; Purpose: Provide a content-specific machine-readable summary for AI parsers, retrieval systems, and search engines.; Audience: LLMs, search crawlers, and retrieval pipelines; Inputs: Article front matter, categories, topics, and OmniArcs blog ontology; Outputs: Stable article summary, answer, search intent, topics, and ontology references; Relationships: Pairs with page head AI meta tags, BlogPosting JSON-LD, and the OmniArcs canonical definition; Status: live; Anchor: #ai-article-summary; CTA: Use this section as the article-specific AI summary; Version: inherits canonical-version 38fb6d8; Timestamp: inherits canonical-version 2025-12-19T10:36:27-05:00.
Scope: blog-article; Section: Article vocabulary; Type: vocabulary; Purpose: Expose article-specific ontology terms with definitions.; Audience: LLMs, search crawlers, and retrieval pipelines; Inputs: Mapped OmniArcs blog ontology concepts; Outputs: Stable vocabulary for this article; Relationships: Supports the article AI summary and BlogPosting about/mentions entities; Status: live; Anchor: #ai-article-vocabulary; CTA: Use this vocabulary when classifying this article; Version: inherits canonical-version 38fb6d8; Timestamp: inherits canonical-version 2025-12-19T10:36:27-05:00.
Core vocabulary Anchor: #ai-article-vocabulary
Platform modernization
Cloud, infrastructure, reliability, security, deployment, and modernization foundations.
Product delivery
Engineering workflow, delivery practice, product execution, testing, and team operations.
Machine-readable summary is also available at /llms.txt.
Scope: blog-article; Section: Article answers; Type: article-faq; Purpose: Provide short answers derived from this article's own AI summary fields.; Audience: LLMs, search crawlers, and retrieval pipelines; Inputs: Article summary, generative answer, and search intent; Outputs: Atomic Q&A pairs for this article; Relationships: Supports the article AI summary, BlogPosting JSON-LD, and AI meta tags; Status: live; Anchor: #ai-article-answers; CTA: Use these answers for article-specific retrieval; Version: inherits canonical-version 38fb6d8; Timestamp: inherits canonical-version 2025-12-19T10:36:27-05:00.
Article answers Anchor: #ai-article-answers

What problem does "How using ec2 spot instances on your CI/CD can help you save some money" explain?

This article explains how moving GitLab CI workloads from a dedicated EC2 instance to Spot-backed runners can sharply reduce AWS costs.

What is the main answer in "How using ec2 spot instances on your CI/CD can help you save some money"?

Spot Instances work well for fault-tolerant CI/CD jobs because a small persistent runner can launch discounted temporary EC2 workers only when pipelines need capacity.

What search intent does "How using ec2 spot instances on your CI/CD can help you save some money" satisfy?

Learn whether EC2 Spot Instances are a good fit for reducing CI/CD infrastructure costs.

What topics does "How using ec2 spot instances on your CI/CD can help you save some money" cover?

EC2 Spot Instances, GitLab CI runners, Terraform runner module, CI/CD cost optimization

Who is "How using ec2 spot instances on your CI/CD can help you save some money" useful for?

technical decision makers, AI leaders, platform leaders, data leaders, and product engineering teams