Finding the Right Instance โ
This tutorial walks through the complete workflow for discovering and evaluating EC2 instance types before launching โ using truffle find, truffle search, truffle spot, and truffle quotas in sequence.
The workflow โ
truffle find โ discover the instance family
truffle search โ browse sizes and filter by specs
truffle spot โ check current Spot prices
truffle quotas โ verify you have headroom
spawn launch โ launch with confidenceEach step is a separate sub-command. Flags like --min-vcpu only exist on truffle search, not on truffle find.
Example: AMD EPYC Genoa instances โ
Step 1 โ Discover the family with truffle find โ
Use plain language to discover which instance families match a processor or capability:
truffle find "epyc genoa"Output (abbreviated):
Found 40 instance types across 11 region(s)
โโโโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโโฌโโโโโโโโฌโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโ
โ Instance Type โ Region โ vCPUs โ Memory (GiB) โ Architecture โ
โโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโผโโโโโโโโผโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโค
โ hpc7a.48xlarge โ us-east-2 โ 96 โ 768.0 โ x86_64 โ
โ m7a.medium โ eu-central-1 โ 1 โ 4.0 โ x86_64 โ
โ m7a.large โ eu-central-1 โ 2 โ 8.0 โ x86_64 โ
โ m8a.4xlarge โ us-east-1 โ 16 โ 64.0 โ x86_64 โ
โ c7a.xlarge โ us-east-1 โ 4 โ 8.0 โ x86_64 โ
...You can see the EPYC Genoa families: m7a, m8a, c7a, r7a, hpc7a. To include spec requirements in the query, put them in the string:
truffle find "epyc genoa 16 cores"
truffle find "epyc genoa 64gb"find vs search flags
truffle find does not accept --min-vcpu or --min-memory. Include specs in the query string instead. Use truffle search when you want to filter by exact numeric thresholds.
Step 2 โ Browse sizes with truffle search โ
Once you know the family, use truffle search to browse all sizes with numeric filters:
truffle search "m8a.*" --min-vcpu 16 --min-memory 64 --skip-azsOutput:
Found 5 instance types across 3 region(s)
โโโโโโโโโโโโโโโโโฌโโโโโโโโโโโโฌโโโโโโโโฌโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโ
โ Instance Type โ Region โ vCPUs โ Memory (GiB) โ Architecture โ
โโโโโโโโโโโโโโโโโผโโโโโโโโโโโโผโโโโโโโโผโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโค
โ m8a.4xlarge โ us-east-1 โ 16 โ 64.0 โ x86_64 โ
โ m8a.8xlarge โ us-east-1 โ 32 โ 128.0 โ x86_64 โ
โ m8a.16xlarge โ us-east-1 โ 64 โ 256.0 โ x86_64 โ
...Common truffle search flags:
--min-vcpu Nโ minimum vCPU count--min-memory Nโ minimum memory in GiB--architecture arm64|x86_64โ filter by CPU architecture--show-priceโ include on-demand pricing--pick-firstโ output only the top result (for scripting)
Step 3 โ Check Spot prices with truffle spot โ
Before committing, check current Spot prices. Spot can be 60โ90% cheaper than on-demand:
truffle spot m8a.4xlarge --sort-by-price --active-only --show-savingsOutput (--show-savings adds the On-Demand and Savings columns, using live AWS Price List rates):
โโโโโโโโโโโโโโโโโฌโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโฌโโโโโโโโโโโโฌโโโโโโโโโโ
โ Instance Type โ Region โ Availability Zone โ Spot Price/hr โ On-Demand โ Savings โ
โโโโโโโโโโโโโโโโโผโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโผโโโโโโโโโโโโผโโโโโโโโโโค
โ m8a.4xlarge โ us-east-1 โ us-east-1a โ $0.0812 โ $0.7750 โ 89% โ
โ โ us-east-1 โ us-east-1c โ $0.0834 โ $0.7750 โ 89% โ
โ โ us-west-2 โ us-west-2b โ $0.0901 โ $0.7750 โ 88% โTo compare across regions, add --regions:
truffle spot m8a.4xlarge --regions us-east-1,us-east-2,eu-west-1 --sort-by-priceStep 4 โ Check your quota with truffle quotas โ
Every AWS account has vCPU quotas per instance family. m8a is in the Standard family (same quota as M, C, R, T instances):
truffle quotas --family Standard --regions us-east-1Output:
โโโโโโโโโโโโฌโโโโโโโโโโโโฌโโโโโโโโโโโโโฌโโโโโโโโโโโโฌโโโโโโโโโโโโโฌโโโโโโโโโ
โ Family โ Type โ Quota โ In Use โ Available โ Status โ
โโโโโโโโโโโโผโโโโโโโโโโโโผโโโโโโโโโโโโโผโโโโโโโโโโโโผโโโโโโโโโโโโโผโโโโโโโโโค
โ Standard โ On-Demand โ 1480 vCPUs โ 153 vCPUs โ 1327 vCPUs โ โ
OK โ
โ Standard โ Spot โ 640 vCPUs โ - โ 640 vCPUs โ โ
OK โAn m8a.4xlarge has 16 vCPUs. With 1327 available, you can run up to ~82 simultaneous on-demand instances before hitting quota.
If you're near the limit, generate a quota increase request:
truffle quotas --family Standard --regions us-east-1 --requestStep 5 โ Launch โ
spawn launch my-job \
--instance-type m8a.4xlarge \
--region us-east-1 \
--spot \
--ttl 4hOr use --pick-first to pipe directly from truffle search:
spawn launch my-job \
--instance-type $(truffle search "m8a.*" --min-vcpu 16 --pick-first) \
--spot \
--ttl 4hGPU example: NVIDIA H100 โ
The same workflow applies for specialized instances:
# 1. Find H100 instances
truffle find "h100 efa"
# 2. Browse p5 sizes (H100 is in p5 family)
truffle search "p5.*" --skip-azs
# 3. Check Spot prices (p5 is rarely Spot โ check on-demand)
truffle spot p5.48xlarge --regions us-east-1,us-west-2
# 4. Check P-family quota (separate from Standard)
truffle quotas --family P --regions us-east-1
# 5. Launch (p5 typically on-demand, not Spot)
spawn launch gpu-job --instance-type p5.48xlarge --ttl 24hQuick reference: which command for what โ
| Task | Command |
|---|---|
| "What instances have H100 GPUs?" | truffle find "h100" |
| "What are all c7a sizes?" | truffle search "c7a.*" |
| "c7a instances with โฅ32 vCPUs" | truffle search "c7a.*" --min-vcpu 32 |
| "Current Spot price for g5.xlarge" | truffle spot g5.xlarge |
| "Do I have quota for more G instances?" | truffle quotas --family G |
| "Check capacity reservations" | truffle capacity --gpu-only |
See also โ
- Spot Instances guide โ handling interruptions, diversifying instance types
- truffle command reference โ all flags for every sub-command