Spotilyzer
raw JSON → 0.2.0 verified Sat May 09 auth: no python
AWS Spot Fleet Analyzer that analyzes Spot Fleet requests and provides recommendations for improving cost efficiency and instance availability. Version 0.2.0, low activity.
pip install spotilyzer Common errors
error ModuleNotFoundError: No module named 'spotilyzer' ↓
cause spotilyzer not installed or wrong Python environment
fix
Run 'pip install spotilyzer' and ensure you're using the same Python environment.
error AttributeError: module 'spotilyzer' has no attribute 'analyze_fleet' ↓
cause Imported incorrectly or old version without the function
fix
Use 'from spotilyzer import analyze_fleet' after checking you have version 0.2.0.
Warnings
gotcha The analyze_fleet function expects a boto3 EC2 client, not a session or resource. ↓
fix Pass an EC2 client object: client = session.client('ec2')
gotcha The library is in early development (0.2.0) and may have limited error handling for invalid fleet IDs. ↓
fix Ensure the fleet ID exists and the caller has DescribeSpotFleetRequests permissions.
Imports
- spotilyzer wrong
from spotilyzer import SpotFleetAnalyzercorrectimport spotilyzer
Quickstart
import boto3
from spotilyzer import analyze_fleet
session = boto3.Session()
client = session.client('ec2')
# Replace with your Spot Fleet request ID
fleet_id = 'sfr-xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx'
result = analyze_fleet(client, fleet_id)
print(result)