You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Consumer / why:sonde samples SPS paired to each on-demand probe (a free signal it correlates against paid fulfillment). A modeled response — SpotPlacementScores[] with Region/AvailabilityZoneId/Score (1–10), honoring SingleAvailabilityZone — would let that pairing be tested offline. Seedable scores per (region/AZ, instance type) would be ideal.
Confirmed, and it is the #885 class again: "ec2:GetSpotPlacementScores": {} is in the generated authorization reference at emulator/authz_reference_gen.go:1075 (from authzref/ec2.json:3717), with an empty resource list meaning AWS supports no resource-level permissions for it — so the only wiring missing is the handler and its dispatch arm. Nothing else in emulator/ mentions spot placement scores.
Verified shapes, and three corrections to the issue body
From API_GetSpotPlacementScores, the parameter names are the query-protocol ones, which differ from the SDK field names this issue uses:
InstanceType.N, not InstanceTypes — "Min 0 items, Max 1000 items".
RegionName.N, not RegionNames — and it is capped at Max 10 items, which is the constraint most likely to matter to a caller sweeping regions.
TargetCapacity is the only required parameter: "Valid Range: Minimum value of 1. Maximum value of 2000000000."
Also optional: DryRun, InstanceRequirementsWithMetadata, NextToken, SingleAvailabilityZone.
Response is spotPlacementScoreSet, nextToken and requestId. SpotPlacementScore has exactly three members, all optional: region, availabilityZoneId, score.
The score range is documented, so it is not substrate's invention: "The placement score, on a scale from 1 to 10. A score of 10 indicates that your Spot request is highly likely to succeed in this Region or Availability Zone. A score of 1 indicates that your Spot request is not likely to succeed."
SingleAvailabilityZone selects which of the two members is populated, and it is either/or, which the issue's phrasing (Region/AvailabilityZoneId/Score together) does not capture: "Specify true so that the response returns a list of scored Availability Zones. Otherwise, the response returns a list of scored Regions." The page also explains why the two are not comparable: "If you request a Spot placement score for Regions, a high score assumes that your fleet request will be configured to use all Availability Zones and the capacity-optimized allocation strategy. If you request a Spot placement score for Availability Zones, a high score assumes that your fleet request will be configured to use a single Availability Zone…" — so a region score and an AZ score are answers to different questions and a caller must not read one as the other.
The Errors section publishes nothing operation-specific: "For information about the errors that are common to all actions, see Common Error Types."
What implementing it looks like here
Small, because the two pieces it needs both exist:
AZ IDs are already modeled and already paired to zone names.ec2SeededZones(region) yields items carrying both ZoneName and ZoneID, derived by azRegionAbbrev (ec2_plugin.go:4992) over ec2SeededAZSuffixes (ec2_instancetypes.go:209), so availabilityZoneId comes out as the same use1-az1 a caller read from DescribeAvailabilityZones rather than a second, differently-derived form. That shared derivation is the whole point of ec2: CreateVolume with neither Size nor SnapshotId produces an 8 GiB volume where AWS refuses #712 and it makes SPS's AZ mode nearly free.
DescribeSpotPriceHistory is the structural precedent (ec2_plugin.go:5808): one stub value per catalog type per zone, from the catalog rather than from any real market.
The one real design decision
SpotPrice in the catalog (ec2_instancetypes.go:19-20) is explicitly documented as "deterministic stubs, not AWS prices … not researched", and a score would be the same kind of value — except worse, because a score is a prediction about capacity, and substrate models no capacity. A constant 10 (or any derived number) would be a value that does not come from where it appears to, which is the exact defect class v0.116.0 was spent removing. So the seeding this issue asks for is not a nice-to-have on top of a default; it is the honest primary interface, and the default should be a single documented constant whose provenance is stated as substrate's, not a plausible-looking spread across zones.
ec2FleetShortfall (ec2_fleet_control.go:14-46) is the seed pattern to copy: a namespace, a key with a "*" wildcard, specific-then-wildcard resolution, and POST/DELETE control endpoints. Keying by (region-or-AZ-ID, instance type) with "*" on either axis covers what this issue asks for.
The repro uses g6.xlarge, and substrate's catalog has ten families — c5, c5a, g4dn, inf1, m5, m5a, p3, r5, t3, t3a (ec2_instancetypes.go:76-167) — with no g6, g5, p4, p5, trn1 or inf2. ec2CheckInstanceTypesExist (:241) refuses an unknown type wherever the catalog is authoritative, so an SPS query for the type in this repro would answer InvalidInstanceType before any scoring logic ran. Filed as #896.
Sizing
S/M — one handler, MaxResults/NextToken pagination, the either/or response mode, the seed pair, docs/services.md. Moved to v0.118.0 with #891, since it is the same consumer's pairing and shares the catalog prerequisite.
Verified against API_GetSpotPlacementScores and API_SpotPlacementScore. Two wire names in the
repro's own flags do not survive the translation to the API, and one range constraint is not what a
reader would assume. Recording them before implementing, because each would produce an operation
that accepts nothing the SDK sends.
Wire names
Commonly written
Actual wire name
InstanceTypes.N
InstanceType.N
RegionNames.N
RegionName.N
The CLI's --instance-types and --region-names flatten to the singular member names. Substrate's extractEC2Filters-style walks are prefix-driven, so a parser keyed on the plural reads an empty
list from a request the SDK considers well-formed — and an empty RegionName.N is legal (minimum 0
items), so the failure is silent rather than a refusal.
MaxResults has a minimum of 10, not 1
Valid Range: Minimum value of 10. Maximum value of 1000. This is a real Valid Range: line, not
prose. It is the only EC2 operation I have seen in this tree whose MaxResults floor is not 1, and it
matters because substrate's shared helper is ec2MaxResults(params, minResults, maxResults) — passing the usual ec2MinUnpublishedMaxResults
(=1) here would accept MaxResults=1, which AWS refuses.
The parameter set, with the two constraints that gate a request
TargetCapacity — Required: Yes, Valid Range: Minimum value of 1. Maximum value of 2000000000. The issue's repro passes --target-capacity 1, the floor.
InstanceType.N — Minimum number of 0 items. Maximum number of 1000 items. The page adds a
recommendation that changes what a test should assert: "We recommend that you specify at least
three instance types. If you specify one or two instance types … the returned placement score will
always be low." The repro specifies one, so a faithful emulator's nominal answer to that exact
command is a low score, not a mid-range one.
RegionName.N — Minimum number of 0 items. Maximum number of 10 items."Enter the Region code,
for example, us-east-1."
SingleAvailabilityZone — Boolean, Required: No. "Specify true so that the response returns a
list of scored Availability Zones. Otherwise, the response returns a list of scored Regions." So
criterion "honoring SingleAvailabilityZone" is exactly right, and the two modes are mutually
exclusive in the response shape rather than additive.
InstanceRequirementsWithMetadata — carries a documented mutual exclusion: "If you specify InstanceRequirementsWithMetadata, you can't specify InstanceTypes."
NextToken, DryRun.
There is no Filter.N on this operation, so it needs no ec2FilterSpec — unlike every Describe
in the package.
SpotPlacementScore has exactly three members, and the 1–10 range is prose only
availabilityZoneId (String), region (String), score (Integer). No capacityAvailable, no
ARN, no metadata.
The issue writes Score (1–10), and 1–10 is correct — but it comes from the operation page's prose
("The Spot placement score for the top 10 Regions or Availability Zones, scored on a scale from 1 to
10"), not from a Valid Range: line on the member. SpotPlacementScore.score publishes no range
constraint at all. Worth stating, because substrate's convention is to enforce published ranges, and
this one is not published where an implementer would look for it.
Three further pieces of prose that bear on what a seed should be allowed to express:
"Different Regions or Availability Zones might return the same score." — so a seed must not
assume distinctness, and a test asserting a strict ordering would be asserting something AWS
denies.
"The Spot placement score serves as a recommendation only."
The response is capped at the top 10 Regions or Availability Zones.
The member is the AZ ID (use1-az1-style), not the AZ name (us-east-1a). The issue's
criterion writes AvailabilityZoneId, which is right, but the distinction is load-bearing for sonde: an AZ ID is stable per account-independent physical location whereas an AZ name is not, and
that is precisely why AWS returns the ID here. Whatever substrate answers has to be consistent with
whatever it answers from DescribeAvailabilityZones, or the pairing the issue describes cannot be
correlated.
No sample response is published
Neither API_GetSpotPlacementScores nor API_SpotPlacementScore publishes an Examples section or
any sample XML. The only verbatim XML on the EC2 reference is the generic error envelope. So the
success-response element names come from the member lists above and the item-wrapper nesting
rests on substrate's existing EC2 query-protocol rendering, not on a citation — that should be
stated rather than implied.
What this changes about the issue
Nothing in the ask is wrong in substance. The corrections are the two wire names, the MaxResults
floor of 10, that score's 1–10 range is prose rather than a constraint line, that the repro's
single instance type is documented to produce a low score, and that SpotPlacementScore carries
only three members — so there is nothing to model beyond region/AZ-ID/score.
Activity
scttfrdmn commentedon Sep 15, 2026
Confirmed, and it is the #885 class again:
"ec2:GetSpotPlacementScores": {}is in the generated authorization reference atemulator/authz_reference_gen.go:1075(fromauthzref/ec2.json:3717), with an empty resource list meaning AWS supports no resource-level permissions for it — so the only wiring missing is the handler and its dispatch arm. Nothing else inemulator/mentions spot placement scores.Verified shapes, and three corrections to the issue body
From
API_GetSpotPlacementScores, the parameter names are the query-protocol ones, which differ from the SDK field names this issue uses:InstanceType.N, notInstanceTypes— "Min 0 items, Max 1000 items".RegionName.N, notRegionNames— and it is capped atMax 10 items, which is the constraint most likely to matter to a caller sweeping regions.TargetCapacityis the only required parameter: "Valid Range: Minimum value of 1. Maximum value of 2000000000."MaxResults' floor is 10, not 1: "Valid Range: Minimum value of 10. Maximum value of 1000." That is unusual enough to be worth a test of its own —pricingLimit-style refusal rather than coercion, per iam: paginateIAMKeys silently rewrites an out-of-range MaxItems to 100 at eight operations AWS refuses #868's rule that an out-of-range page size is refused, not silently rewritten.TargetCapacityUnitType:vcpu | memory-mib | units.DryRun,InstanceRequirementsWithMetadata,NextToken,SingleAvailabilityZone.Response is
spotPlacementScoreSet,nextTokenandrequestId.SpotPlacementScorehas exactly three members, all optional:region,availabilityZoneId,score.The score range is documented, so it is not substrate's invention: "The placement score, on a scale from
1to10. A score of10indicates that your Spot request is highly likely to succeed in this Region or Availability Zone. A score of1indicates that your Spot request is not likely to succeed."SingleAvailabilityZoneselects which of the two members is populated, and it is either/or, which the issue's phrasing (Region/AvailabilityZoneId/Scoretogether) does not capture: "Specifytrueso that the response returns a list of scored Availability Zones. Otherwise, the response returns a list of scored Regions." The page also explains why the two are not comparable: "If you request a Spot placement score for Regions, a high score assumes that your fleet request will be configured to use all Availability Zones and thecapacity-optimizedallocation strategy. If you request a Spot placement score for Availability Zones, a high score assumes that your fleet request will be configured to use a single Availability Zone…" — so a region score and an AZ score are answers to different questions and a caller must not read one as the other.The
Errorssection publishes nothing operation-specific: "For information about the errors that are common to all actions, see Common Error Types."What implementing it looks like here
Small, because the two pieces it needs both exist:
ec2SeededZones(region)yields items carrying bothZoneNameandZoneID, derived byazRegionAbbrev(ec2_plugin.go:4992) overec2SeededAZSuffixes(ec2_instancetypes.go:209), soavailabilityZoneIdcomes out as the sameuse1-az1a caller read fromDescribeAvailabilityZonesrather than a second, differently-derived form. That shared derivation is the whole point of ec2: CreateVolume with neither Size nor SnapshotId produces an 8 GiB volume where AWS refuses #712 and it makes SPS's AZ mode nearly free.DescribeSpotPriceHistoryis the structural precedent (ec2_plugin.go:5808): one stub value per catalog type per zone, from the catalog rather than from any real market.The one real design decision
SpotPricein the catalog (ec2_instancetypes.go:19-20) is explicitly documented as "deterministic stubs, not AWS prices … not researched", and a score would be the same kind of value — except worse, because a score is a prediction about capacity, and substrate models no capacity. A constant 10 (or any derived number) would be a value that does not come from where it appears to, which is the exact defect class v0.116.0 was spent removing. So the seeding this issue asks for is not a nice-to-have on top of a default; it is the honest primary interface, and the default should be a single documented constant whose provenance is stated as substrate's, not a plausible-looking spread across zones.ec2FleetShortfall(ec2_fleet_control.go:14-46) is the seed pattern to copy: a namespace, a key with a"*"wildcard, specific-then-wildcard resolution, andPOST/DELETEcontrol endpoints. Keying by (region-or-AZ-ID, instance type) with"*"on either axis covers what this issue asks for.Blocker shared with #891 and #894
The repro uses
g6.xlarge, and substrate's catalog has ten families —c5,c5a,g4dn,inf1,m5,m5a,p3,r5,t3,t3a(ec2_instancetypes.go:76-167) — with nog6,g5,p4,p5,trn1orinf2.ec2CheckInstanceTypesExist(:241) refuses an unknown type wherever the catalog is authoritative, so an SPS query for the type in this repro would answerInvalidInstanceTypebefore any scoring logic ran. Filed as #896.Sizing
S/M — one handler,
MaxResults/NextTokenpagination, the either/or response mode, the seed pair,docs/services.md. Moved to v0.118.0 with #891, since it is the same consumer's pairing and shares the catalog prerequisite.feat(ec2): seed eleven accelerated instance-type families completely (#…
scttfrdmn commentedon Sep 17, 2026
Verified against
API_GetSpotPlacementScoresandAPI_SpotPlacementScore. Two wire names in therepro's own flags do not survive the translation to the API, and one range constraint is not what a
reader would assume. Recording them before implementing, because each would produce an operation
that accepts nothing the SDK sends.
Wire names
InstanceTypes.NInstanceType.NRegionNames.NRegionName.NThe CLI's
--instance-typesand--region-namesflatten to the singular member names. Substrate'sextractEC2Filters-style walks are prefix-driven, so a parser keyed on the plural reads an emptylist from a request the SDK considers well-formed — and an empty
RegionName.Nis legal (minimum 0items), so the failure is silent rather than a refusal.
MaxResultshas a minimum of 10, not 1Valid Range: Minimum value of 10. Maximum value of 1000.This is a realValid Range:line, notprose. It is the only EC2 operation I have seen in this tree whose
MaxResultsfloor is not 1, and itmatters because substrate's shared helper is
ec2MaxResults(params, minResults, maxResults)— passing the usualec2MinUnpublishedMaxResults(=1) here would accept
MaxResults=1, which AWS refuses.The parameter set, with the two constraints that gate a request
TargetCapacity— Required: Yes,Valid Range: Minimum value of 1. Maximum value of 2000000000.The issue's repro passes--target-capacity 1, the floor.InstanceType.N—Minimum number of 0 items. Maximum number of 1000 items.The page adds arecommendation that changes what a test should assert: "We recommend that you specify at least
three instance types. If you specify one or two instance types … the returned placement score will
always be low." The repro specifies one, so a faithful emulator's nominal answer to that exact
command is a low score, not a mid-range one.
RegionName.N—Minimum number of 0 items. Maximum number of 10 items."Enter the Region code,for example,
us-east-1."SingleAvailabilityZone— Boolean, Required: No. "Specifytrueso that the response returns alist of scored Availability Zones. Otherwise, the response returns a list of scored Regions." So
criterion "honoring
SingleAvailabilityZone" is exactly right, and the two modes are mutuallyexclusive in the response shape rather than additive.
TargetCapacityUnitType—vcpu | memory-mib | units.InstanceRequirementsWithMetadata— carries a documented mutual exclusion: "If you specifyInstanceRequirementsWithMetadata, you can't specifyInstanceTypes."NextToken,DryRun.There is no
Filter.Non this operation, so it needs noec2FilterSpec— unlike every Describein the package.
SpotPlacementScorehas exactly three members, and the 1–10 range is prose onlyavailabilityZoneId(String),region(String),score(Integer). NocapacityAvailable, noARN, no metadata.
The issue writes
Score(1–10), and 1–10 is correct — but it comes from the operation page's prose("The Spot placement score for the top 10 Regions or Availability Zones, scored on a scale from 1 to
10"), not from a
Valid Range:line on the member.SpotPlacementScore.scorepublishes no rangeconstraint at all. Worth stating, because substrate's convention is to enforce published ranges, and
this one is not published where an implementer would look for it.
Three further pieces of prose that bear on what a seed should be allowed to express:
assume distinctness, and a test asserting a strict ordering would be asserting something AWS
denies.
Response elements:
spotPlacementScoreSet,nextToken,requestId.Note on
availabilityZoneIdThe member is the AZ ID (
use1-az1-style), not the AZ name (us-east-1a). The issue'scriterion writes
AvailabilityZoneId, which is right, but the distinction is load-bearing forsonde: an AZ ID is stable per account-independent physical location whereas an AZ name is not, andthat is precisely why AWS returns the ID here. Whatever substrate answers has to be consistent with
whatever it answers from
DescribeAvailabilityZones, or the pairing the issue describes cannot becorrelated.
No sample response is published
Neither
API_GetSpotPlacementScoresnorAPI_SpotPlacementScorepublishes an Examples section orany sample XML. The only verbatim XML on the EC2 reference is the generic error envelope. So the
success-response element names come from the member lists above and the
item-wrapper nestingrests on substrate's existing EC2 query-protocol rendering, not on a citation — that should be
stated rather than implied.
What this changes about the issue
Nothing in the ask is wrong in substance. The corrections are the two wire names, the
MaxResultsfloor of 10, that
score's 1–10 range is prose rather than a constraint line, that the repro'ssingle instance type is documented to produce a low score, and that
SpotPlacementScorecarriesonly three members — so there is nothing to model beyond region/AZ-ID/score.
feat(ec2): GetSpotPlacementScores, with a seedable score (#892) (#1031)