Repository navigation
Releases
v1.2.0
Full Changelog: v1.1.0...v1.2.0
v1.1.0
v1.0.3
This is a bug fix release that resolves an issue where newer instance types were missing from query results due to incomplete API pagination.
🐛 Bug Fixes
Fixed DescribeInstanceTypes API Pagination
The DescribeInstanceTypes API defaults to returning only 100 records per call. Previously, the tool made a single API call and only retrieved the first 100 instance types, causing newer instance types (e.g. ecs.u2a-c1m2.xlarge) to be silently truncated from results.
- Added NextToken-based pagination loop with
MaxResults=100to retrieve ALL available instance types - Newer instance types now appear in query results as expected
- No behavior changes for existing workflows — only more complete results
🔄 Migration Notes
This is a backward-compatible release. Existing scripts and workflows will continue to work without changes. You may notice additional instance types appearing in results that were previously missing due to the pagination limit.
Full Changelog: v1.0.2...v1.0.3
Full Changelog: v1.0.2...v1.0.3
Release v1.0.2
Release Date: December 12, 2025
🆕 What's New
This release introduces instance type specification, improved parameter validation, comprehensive test coverage, and several bug fixes.
✨ New Features
Instance Type Specification (--instanceType)
You can now specify exact instance types instead of filtering by family, CPU, or memory:
- Comma-separated list: Specify multiple instance types (e.g.,
ecs.n1.small,ecs.n2.large) - Takes precedence: When
--instanceTypeis specified, it overrides the--familyparameter - Skips other filters: All other filters (CPU, memory, architecture) are automatically skipped
- Auto-skip invalid types: Non-existent or invalid instance types are automatically skipped
Parameter Validation
- Required parameter checking: Validates that
accessKeyIdandaccessKeySecretare provided - Helpful error messages: Displays help information when required parameters are missing
- JSON error format: Errors are output in JSON format when using
--jsonflag - No more panics: Prevents crashes when parameters are missing
🐛 Bug Fixes
- Fixed
GetPossibilityfunction: Now properly handles empty price arrays (returns 0.0 instead of causing errors) - Code formatting: Fixed indentation and formatting issues
🧪 Testing
Added comprehensive test coverage:
meta_test.go: Tests for architecture normalization, instance filtering, and price analysissort_test.go: Tests for price sorting, latest price finding, and possibility calculation- Edge case handling: Tests for empty arrays and boundary conditions
📋 Usage Examples
Specify Exact Instance Types
# Analyze specific instance types
./spot-instance-advisor \
--accessKeyId YOUR_KEY \
--accessKeySecret YOUR_SECRET \
--instanceType ecs.n1.small,ecs.n2.large,ecs.c6.large \
--jsonNote: When using --instanceType, all other filters (CPU, memory, architecture) are ignored.
Parameter Validation
# Missing required parameters now shows helpful error
./spot-instance-advisor --json
# Output: {"error": "Missing required parameters", "message": "accessKeyId and accessKeySecret are required"}Combined with Other Features
# Instance type specification with other options
./spot-instance-advisor \
--accessKeyId YOUR_KEY \
--accessKeySecret YOUR_SECRET \
--instanceType ecs.n1.small,ecs.n2.large \
--cutoff 3 \
--limit 10 \
--json📝 JSON Output Format
The JSON output format remains the same, but now works seamlessly with instance type specification:
[
{
"instanceTypeId": "ecs.n1.small",
"zoneId": "cn-hangzhou-a",
"pricePerCore": 0.1234,
"discount": 2.5,
"possibility": 0.8,
"cpuCoreCount": 1,
"memorySize": 2.0,
"instanceFamily": "ecs.n1",
"arch": "x86_64"
}
]📚 Documentation Updates
- Updated
README.mdwith--instanceTypeusage examples and behavior documentation - Updated
USAGE.mdwith detailed--instanceTypeparameter documentation - Documented that
--instanceTypeskips all other filters when specified - Added examples for instance type specification
🔄 Dependencies
- Updated
golang.org/x/sysfrom v0.37.0 to v0.39.0
🎯 Use Cases
The new --instanceType parameter is particularly useful for:
- Specific instance analysis: When you know exactly which instance types you want to analyze
- Migration planning: Comparing prices for specific instances you're currently using
- Cost comparison: Comparing prices between specific instance types
- Automation: Scripts that need to analyze predefined instance types
🔄 Migration Notes
This is a backward-compatible release. Existing scripts and workflows will continue to work without changes. The --instanceType parameter is optional and can be used alongside or instead of existing filters.
Full Changelog: v1.0.1...v1.0.2
Release v1.0.1
Release Date: November 5, 2025
🆕 What's New
Architecture Filtering
Added support for filtering instances by CPU architecture, allowing you to find instances that match your specific architecture requirements.
✨ New Features
--arch Parameter
- Filter instances by CPU architecture
- Supported values:
x86_64orarm64 - Works in combination with other filters (CPU, memory, family)
Architecture in JSON Output
- Added
archfield to JSON output format - Enables programmatic filtering and analysis by architecture
📋 Usage Examples
Filter by Architecture
# Find x86_64 instances
./spot-instance-advisor \
--accessKeyId YOUR_KEY \
--accessKeySecret YOUR_SECRET \
--arch x86_64 \
--json
# Find ARM64 instances
./spot-instance-advisor \
--accessKeyId YOUR_KEY \
--accessKeySecret YOUR_SECRET \
--arch arm64 \
--mincpu 2 \
--maxcpu 8 \
--jsonCombined Filtering
# Find ARM64 instances in specific families
./spot-instance-advisor \
--accessKeyId YOUR_KEY \
--accessKeySecret YOUR_SECRET \
--family ecs.n1,ecs.n2 \
--arch arm64 \
--limit 10 \
--json📝 JSON Output Format
The JSON output now includes the arch field:
[
{
"instanceTypeId": "ecs.n1.small",
"zoneId": "cn-hangzhou-a",
"pricePerCore": 0.1234,
"discount": 2.5,
"possibility": 0.8,
"cpuCoreCount": 1,
"memorySize": 2.0,
"instanceFamily": "ecs.n1",
"arch": "x86_64"
}
]📚 Documentation Updates
- Updated
README.mdwith--archparameter documentation - Updated
USAGE.mdwith architecture filtering examples - Added architecture filtering to all relevant examples
🔄 Migration Notes
This is a backward-compatible release. Existing scripts and workflows will continue to work without changes. The --arch parameter is optional and defaults to no architecture filtering.
Full Changelog: v1.0.0...v1.0.1
Release v1.0.0
Release Date: October 22, 2025
🎉 Initial Release
This is the first stable release of Spot Instance Advisor, a command-line tool for analyzing Alibaba Cloud Spot instance prices and availability.
✨ Features
Core Functionality
- Instance Filtering: Filter instances by CPU cores, memory, and instance family
- Price Analysis: Analyze historical Spot prices with customizable time windows
- Cost Optimization: Find instances with the best price-to-performance ratios
- Availability Insights: Get price stability indicators (possibility scores)
Output Formats
- Human-readable tables: Easy-to-read formatted output
- JSON output: Machine-readable format for automation (
--jsonflag) - JSON error format: Structured error messages when using JSON mode
Multi-Platform Support
Pre-built binaries available for:
- Linux: amd64, arm64
- macOS/Darwin: amd64, arm64
- Windows: amd64
All binaries are statically linked and optimized for production use.
📋 Command Line Options
Authentication
--accessKeyId: Alibaba Cloud Access Key ID (required)--accessKeySecret: Alibaba Cloud Access Key Secret (required)--region: Target region (default: cn-hangzhou)
Instance Filtering
--mincpu/--maxcpu: CPU core range (default: 1-32)--minmem/--maxmem: Memory range in GB (default: 2-64)--family: Instance family filter (comma-separated, e.g.,ecs.n1,ecs.n2)
Analysis Parameters
--cutoff: Discount threshold (default: 2)--limit: Maximum number of results (default: 20)--resolution: Price history analysis window in days (default: 7)
Output Format
--json: Output results in JSON format
📦 Installation
Download Pre-built Binaries
Download the appropriate binary for your platform from the Releases page.
Build from Source
git clone <repository-url>
cd spot-instance-advisor
make build🚀 Quick Start
# Basic usage with table output
./spot-instance-advisor \
--accessKeyId YOUR_ACCESS_KEY_ID \
--accessKeySecret YOUR_ACCESS_KEY_SECRET \
--region cn-hangzhou
# JSON output for programmatic use
./spot-instance-advisor \
--accessKeyId YOUR_ACCESS_KEY_ID \
--accessKeySecret YOUR_ACCESS_KEY_SECRET \
--region cn-hangzhou \
--json📚 Documentation
- README.md - Full documentation and examples
- USAGE.md - Detailed usage guide
- RELEASE.md - Release process documentation
🔧 Infrastructure
- Go Modules: Modern dependency management
- GitHub Actions: Automated CI/CD pipeline
- Automated Releases: Cross-platform binary builds
- Makefile: Comprehensive build system
📝 JSON Output Format
When using --json, the output format is:
[
{
"instanceTypeId": "ecs.n1.small",
"zoneId": "cn-hangzhou-a",
"pricePerCore": 0.1234,
"discount": 2.5,
"possibility": 0.8,
"cpuCoreCount": 1,
"memorySize": 2.0,
"instanceFamily": "ecs.n1"
}
]🙏 Acknowledgments
- Alibaba Cloud for providing the ECS API
- The Go community for excellent tooling and libraries
Full Changelog: See CHANGELOG.md