A lightweight command-line tool that continuously monitors Lambda Cloud for GPU instance availability and sends real-time notifications when instances become available.
Lambda's GPU instances (A100, H100, etc.) are often sold out. This script polls the Lambda API at a configurable interval and alerts you the moment a spot opens up — so you can grab it before it's gone.
- Polls the Lambda Cloud API for all GPU instance types on a configurable interval (default: 60s)
- Detects newly available instances and highlights them in the terminal
- Sends native OS notifications (macOS, Linux, Windows) with a terminal bell when new instances appear
- Notification cooldown prevents spam for the same instance type (default: 5 min)
- Displays pricing, GPU count, RAM, storage, and available regions for each instance
- Color-coded terminal output for easy scanning
- Validates your API key on startup
- Python 3.7+
requestslibrary
git clone http://github.com/Linqizhe07/Instance_monitor.git
cd Instance_monitor
pip install requests-
Get an API key from Lambda Cloud → API Keys.
-
Run the script:
python3 lambda_monitor.py
-
Enter your API key when prompted (or set it as an environment variable):
export LAMBDA_API_KEY="your-api-key-here" python3 lambda_monitor.py
-
Press
Ctrl+Cto stop.
Edit the constants near the top of lambda_monitor.py:
| Variable | Default | Description |
|---|---|---|
CHECK_INTERVAL |
60 |
Seconds between each API poll |
NOTIFY_COOLDOWN |
300 |
Seconds before re-notifying for the same instance type |
╔══════════════════════════════════════════════════╗
║ Lambda Cloud GPU Instance Monitor ║
╚══════════════════════════════════════════════════╝
[14:32:10] 🟢 #5 Found 2 available instance types!
🆕 NEW! 1x NVIDIA A100 (40 GB SXM4)
💰 $1.10/hr | 🖥 1 GPU | 💾 200 GB RAM | 📦 512 GB Storage
🌍 Regions: us-tx-3
1x NVIDIA H100 (80 GB SXM5)
💰 $2.49/hr | 🖥 1 GPU | 💾 200 GB RAM | 📦 512 GB Storage
🌍 Regions: us-west-1
The script sends native desktop notifications via:
- macOS —
osascript(with Glass sound) - Linux —
notify-send - Windows — PowerShell toast notifications
If the notification subsystem is unavailable, the script falls back silently to terminal bell only.
MIT