HackerReposA FIELD GUIDE TO OPEN SOURCE
ProSponsor the shelf♧ 0
← Back to top all-time
LeanerCloud
AutoSpotting
Go2020–2024
LeanerCloud / AutoSpotting

AutoSpotting

Saves up to 90% of AWS EC2 costs by automating the use of spot instances on existing AutoScaling groups. Installs in minutes using CloudFormation or Terraform. Convenient to deploy at scale using StackSets. Uses tagging to avoid launch configuration changes. Automated spot termination handling. Reliable fallback to on-demand instances.

4Distinct people
8Mentions
0Explicit recommenders
2.4KGitHub stars
REPOSITORY AT A GLANCE

What to know before exploring

What it is

Saves up to 90% of AWS EC2 costs by automating the use of spot instances on existing AutoScaling groups. Installs in minutes using CloudFormation or Terraform. Convenient to deploy at scale using StackSets. Uses tagging to avoid launch configuration changes. Automated spot termination handling. Reliable fallback to on-demand instances.

GitHub

Where it is used

No documented product use has been verified yet.

What people are saying

No recommendation phrase was found in the indexed comments.

No classified warning is attached to this page. Read the discussions before treating silence as approval.

Also in these discussions

No other repository is repeatedly linked in the same discussions.

This week on Hacker News

Nov 7–Nov 14 UTC · Direct repository links and separately labeled related project stories. Indexed through 11/14/2026, 3:56:07 PM UTC.

No direct repository links were found in the indexed HN discussions over the past seven days. Older discussions are available below.

Mentions over time

HN mentions by year8 dated mentions

Observed mentions: 2020-02-25 03:56:04 UTC to 2024-06-05 16:28:08 UTC.

0123452020-01-01 00:00:00 UTC to 2021-01-01 00:00:00 UTC (exclusive): 5 mentions; 0 submissions, 5 comments20202021-01-01 00:00:00 UTC to 2022-01-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2022-01-01 00:00:00 UTC to 2023-01-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments20222023-01-01 00:00:00 UTC to 2024-01-01 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 comments2024-01-01 00:00:00 UTC to 2025-01-01 00:00:00 UTC (exclusive): 2 mentions; 0 submissions, 2 comments2024

Counts come from the repository’s dated source evidence. Index cutoff: 2026-11-02 08:16:59 UTC.

View mention counts and date ranges
UTC ranges include their start and exclude their end. Select a period to filter the source evidence.
PeriodStart (UTC)End (exclusive, UTC)MentionsSubmissionsComments
20202020-01-01 00:00:00 UTC2021-01-01 00:00:00 UTC505
20212021-01-01 00:00:00 UTC2022-01-01 00:00:00 UTC000
20222022-01-01 00:00:00 UTC2023-01-01 00:00:00 UTC000
20232023-01-01 00:00:00 UTC2024-01-01 00:00:00 UTC101
20242024-01-01 00:00:00 UTC2025-01-01 00:00:00 UTC202

What Hacker News says

8 sources
This is besides the point, the AutoSpotting and EBS Optimizer tools are not even in the scope of this release, I just mentioned them for a bit of extra context about myself and what I've been building previously. Feel free to criticize them, but that code saved thousands of customers over $100M over the years in aggregate, and was launching at some point a non-negligible percentage of the total AWS Spot capacity. Regarding the OSS repos, I said they're also still available as open source, but evolved a lot since in the commercial version as stated in the readme of AutoSpotting. This is the list of changes only available in the commercial version of AutoSpotting: https://github.com/LeanerCloud/AutoSpotting/discussions/489 For EBS Optimizer, the OSS code base evolved into the Optimizer tool released under the ONCE model as part of this bund
Read the rest
le and it's been all but rewritten. Regarding the lack of tests, the code base has seen many changes since, and critical areas have unit tests now. When it comes to IaC drift, in case of AutoSpotting and EBS Optimizer the ASGs and volumes are expected to be tagged as per the expected tags, and you can do that through IaC to avoid drift. The instances launched by the ASG can be replaced by AutoSpotting without creating any IaC drift, because the infrastructure code does not have any reference to the instances. The same is true for EBS Optimizer, it is expected to run against EBS volumes created when launching instances. The IaC will not show drift because it's not keeping track of the underlying EBS volumes, only launching the instances. But the Optimizer tool part of this ONCE release will indeed cause drift because it's changing the instance type of RDS databases and Elasticache clusters, which is captured in the IaC code. The drift will need to be resolved after the fact, which is what I do as part of my service work when using this tool for my customers. These tools saved me a lot of time when saving my customers money, and the TF building blocks are just examples of a few patterns that I used for delivering infra for my customers and I've been thinking it may save some people time from building the same from scratch. If you're not interested in these, fair enough, some people already bought these.
In Releasing my CLI AWS cost saving tools and TF microservice components as ONCE
I'm a solopreneur doing AWS cost optimization tools and services, much like a Pieter Levels in the niche of Corey Quinn. For many years I've been building self-hosted serverless headless AWS cost optimization tools: - AutoSpotting.io - for adopting Spot instances in ASGs without configuration changes, no vendor lock-in, and with automated diversification and failover to on-demand - started as OSS alternative to the Spot.io Elastic Group product, still available as OSS at https://github.com/LeanerCloud/AutoSpotting. - EBS Optimizer for GP3 converting EBS volumes to GP3, also available as OSS at https://github.com/LeanerCloud/EBS-Optimizer. (I'm currently working on a few more, for example a NAT Gateway alternative and a tool to automate Savings plans purchases.) Over the last year I started to offer cost optimization as a service, mainly i
Read the rest
n order to get more ideas for such tools. Over multiple customer engagements I built almost a dozen CLI tools that can be used to optimize many of the AWS services at my customers. Using these tools I was able to deliver some 70% cost optimizations in average at my services customers over the supported resources, and sometimes as high as 60% of their entire AWS bill. I also did a few DevOps engagements, out of which I developed a bunch of Terraform building blocks that can be used to create ECS Fargate or Lambda microservices with persistence on RDS Aurora Serverless v2, with automated CI/CD and other goodies included out of the box. My main FinOps CLI tool named Optimizer was evolved out of EBS Optimizer over multiple customer engagements, and now does automated conversion to GP3 for EC2 and RDS storage volumes, as well as rightsizing and conversion to Graviton for RDS, ElastiCache and OpenSearch, among other things. I recently started to offer Optimizer under the ONCE Source-Available license used by 37signals for Campfire, and I will gradually release all my CLI FinOps tools and Terraform building blocks under a large bundle of tools and building blocks. (The Terraform building blocks scheduled to be released in a couple of days) If you're looking to optimize cloud costs and/or build serverless microservices on AWS, you may want to check this out.
In Releasing my CLI AWS cost saving tools and TF microservice components as ONCE
There's a service that handles obtaining the cheapest spot instances to your specs by a former aws engineer https://github.com/LeanerCloud/AutoSpotting Effectively, it starts up cheap spot instances (based on specified criteria) across a variety of instance types to replace whatever regular instance in an autoscaling group comes online and then spins down the regular instance. EG: That m4a you wanted may be expensive... but nobody is using m4ad so it's 85% off and it meets the specified CPU/RAM requirements... auto spotting will spin it up instead. Having used it on and off over the years it is sometimes eyebrow raising to see 4xl boxes running cheaper than the xl box they replaced :)
In Farewell to the Era of Cheap EC2 Spot Instances
we scale up to about 100 machines. We use spot instances EXTENSIVELY. And that configuration was tricky actually. Its been a couple of months now. Works pretty ok. k3s is actually pretty simple to use now. the tricky part was to integrate with https://github.com/kubernetes/cloud-provider-aws and https://github.com/DirectXMan12/k8s-prometheus-adapter The hardest part is to get it to work with spot instances. we use https://github.com/AutoSpotting/AutoSpotting to integrate with it.
In Bare-Metal Kubernetes with K3s
There's an excellent implementation using AWS lambda to manage spot instances at https://github.com/AutoSpotting/AutoSpotting What's fantastic about the autospotting implementation is: 1. It dynamically replaces existing instances with spot instances just by setting a tag 2. Rather than replacing the instance with a fixed spot instance type, it will choose the cheapest that fits the requirements. 3. If there are no spot instances available that fit the requirements, it will spin up on demand instances until spot instances are available. If you have experience working with spot then you will know that these are really outstanding features that hopefully amazon will bake-in in the future.
In Designing a scalable API on AWS spot instances
Shout-out for "AutoSpotting", which transparently re-launches a regular On-Demand ASG as spot instances, and will fall back to regular instances: https://github.com/AutoSpotting/AutoSpotting/ Combined with the fact that you can have an ASG with multiple instance types: https://aws.amazon.com/blogs/aws/new-ec2-auto-scaling-groups... Means that you can be reasonably certain you'll never run out of capacity unless AWS runs out of every single instance type you have requested, terminates your Spot instances, and you can't launch any more On-Demand ones. (and even so, set a minimum percentage of On-Demand in AutoSpotting to ensure you maintain at least some capacity)
In We use Kubernetes and spot instances to reduce EC2 billing up to 80%

MAKE YOURSELF AT HOME

A few shortcuts

/
Search the collection
?
Open this guide
Esc
Close dialogs and navigation

Your saved repositories and interests stay in this browser.