Production-grade spot instance scheduling for EKS worker nodes
Spotter intelligently manages EC2 spot instances as EKS worker nodes, automatically finding the cheapest ARM64 instances across availability zones while handling interruptions gracefully. Achieves 70-80% cost savings over on-demand instances.
- Real-time Pricing Analysis: Continuous spot price monitoring with automatic instance selection
- Multi-AZ Distribution: Optimal instance placement across availability zones
- Interruption Resilience: Automatic replacement with fallback instance types
- ARM64 Optimization: Targets modern ARM64 families (c7g, c8g, m7g, m8g, r7g, r8g)
- EKS Integration: Native integration via CloudFormation launch templates
Spotter Lambda
- Analyzes spot pricing every 10 minutes
- Stores top 6 cheapest instances per AZ in SSM parameters
- Filters for ARM64, current-generation, non-burstable instances
InstanceRunner Lambda
- Launches instances based on pricing recommendations
- Handles spot interruption events with same-AZ replacement
- Implements intelligent fallback on Capacity issues
- AWS CLI configured with appropriate permissions
- SAM CLI installed
- EKS cluster with kubectl access
- EC2 Spot service-linked role
pip install spotter-cli# Bootstrap Infrastructure
$ spotter bootstrap --region us-west-2
# Onboard EKS Cluster
$ spotter onboard my-cluster --region us-west-2
# Launch Instances
$ spotter scale my-cluster --count 3 --region us-west-2--scale-to-count will scale up or down to the count specified
$ spotter scale my-cluster --count 7 --scale-to-count --region us-west-2rebalance will make the instance spread across AZ's
$ spotter rebalance my-cluster --region us-west-2bootstrap Deploy Spotter infrastructure
destroy Destroy Spotter infrastructure
onboard Onboard an EKS cluster to spotter
list-clusters List onboarded clusters
offboard Remove a cluster from Spotter
scale Scale Spotter instances for a cluster
list-instances Show current instance status for a cluster
rebalance Rebalance instances across availability zones
refresh-prices Refresh spot pricing data
pricing View spot pricing data Pricing data stored in SSM parameters:
/spotter/prices/{az}- Top 6 instances per availability zone/spotter/settings/{cluster}- Cluster configuration
/aws/lambda/Spotter- Pricing analysis logs/aws/lambda/InstanceRunner- Instance launch logs
See docs/troubleshooting.md for comprehensive troubleshooting guidance.
Remove all Spotter resources:
spotter destroy --region us-west-2For cluster-specific cleanup:
spotter offboard my-cluster --region us-west-2Vibe coded with Amazon Q



