Finding the Right Instance โ
This tutorial walks through the complete workflow for discovering and evaluating EC2 instance types before launching โ using truffle find, truffle spot, and truffle quotas in sequence.
The workflow โ
truffle find โ discover the instance family
truffle find โ browse its 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. truffle find takes specs in the query string ("m8a 16 cores 64gb"); it has no --min-vcpu or --min-memory flags.
Example: AMD EPYC instances โ
Step 1 โ Discover the family with truffle find โ
Use plain language to discover which instance families match a processor or capability:
truffle find "amd turin"find searches your configured region (here us-east-1). Add --all-regions to search every enabled region, or --regions to pick some.
Output (abbreviated, some columns omitted):
Found 48 instance types across 1 region(s)
โโโโโโโโโโโโโโโโโฌโโโโโโโโโโโโฌโโโโโโโโฌโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโ
โ Instance Type โ Region โ vCPUs โ Memory (GiB) โ Architecture โ
โโโโโโโโโโโโโโโโโผโโโโโโโโโโโโผโโโโโโโโผโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโค
โ m8a.medium โ us-east-1 โ 1 โ 4.0 โ x86_64 โ
โ m8a.large โ us-east-1 โ 2 โ 8.0 โ x86_64 โ
โ c8a.xlarge โ us-east-1 โ 4 โ 8.0 โ x86_64 โ
โ r8a.xlarge โ us-east-1 โ 4 โ 32.0 โ x86_64 โ
โ m8a.4xlarge โ us-east-1 โ 16 โ 64.0 โ x86_64 โ
...You can see the EPYC Turin (5th gen) families, such as m8a, c8a, and r8a; truffle find "amd genoa" lists the 4th-gen ones (m7a, c7a, r7a, hpc7a). A long result can be cut short with --limit N, which lists the first N instance types and, unlike | head, keeps the table's border and footer.
To include spec requirements, put them in the query string:
truffle find "amd turin 16 cores"
truffle find "amd turin 64gb"Use amd for the vendor. epyc is not in truffle's vocabulary, so it is ignored, with a note. See truffle find --help for the words it understands.
Specs go in the query
truffle find does not accept --min-vcpu or --min-memory. Include specs in the query string instead. They are minimums; add --exact to match them exactly.
Step 2 โ Browse sizes with truffle find โ
Once you know the family, name it in the query with your spec. This lists the m8a sizes with at least 16 vCPUs and 64 GiB of memory:
truffle find "m8a 16 cores 64gb" --skip-azsOutput (abbreviated, some columns omitted):
Found 8 instance types across 1 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.12xlarge โ us-east-1 โ 48 โ 192.0 โ x86_64 โ
...To list every size in the family instead, use a pattern: truffle find "m8a.*" (or just truffle find m8a).
Useful truffle find options:
16 cores/16 physical coresin the query โ minimum vCPUs / physical cores64gbin the query โ minimum memory in GiBarm64/x86_64in the query โ CPU architecture--exactโ match the vCPU and memory in the query exactly--show-priceโ add on-demand pricing to pattern queries (plain-language results include it already)--limit Nโ list only the first N instance types--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-onlytruffle spot searches every enabled region and always shows the On-Demand price and the saving (On-Demand rates come from the live AWS Price List). For a long list, --limit N shows only the first N rows. Output:
โโโโโโโโโโโโโโโโโฌโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโฌโโโโโโโโโโโโฌโโโโโโโโโโ
โ 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 specific regions only, 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 (the same quota as other M, C, R, and 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 find:
spawn launch my-job \
--instance-type $(truffle find "m8a 16 cores 64gb" --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 find "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 find "c7a.*" |
| "c7a instances with โฅ32 vCPUs" | truffle find "c7a 32 cores" |
| "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