Repository navigation
Description
Found driving automat against substrate server at v0.97.0 (42f1bf6).
What happens
defaultServiceQuotas and defaultServiceList in emulator/servicequotas_types.go cover ten services; organizations is not one of them. So the accounts-per-organization quota — L-E619E033, "Maximum number of accounts", the one quota that governs whether an account-vending tool can create anything at all — cannot be read:
operation error Service Quotas: GetServiceQuota,
https response error StatusCode: 400, RequestID: ,
NoSuchResourceException: No quota found for service "organizations" quota "L-E619E033"
Reproduce:
substrate server --address 127.0.0.1:4566 &
export AWS_ENDPOINT_URL=http://127.0.0.1:4566 AWS_REGION=us-east-1 \
AWS_ACCESS_KEY_ID=substrate AWS_SECRET_ACCESS_KEY=substrate
aws service-quotas get-service-quota --service-code organizations --quota-code L-E619E033
aws service-quotas list-service-quotas --service-code organizations # {"Quotas": []}Now that Organizations itself is well covered (#578, #610, #577 all fixed), this is what stops the vending story from being testable end to end: CreateAccount works, but nothing can check the ceiling it runs into.
The part that actively misleads
getServiceQuota returns NoSuchResourceException for an unseeded service, and real Service Quotas returns that for a genuinely bogus quota code. A caller cannot tell the two apart. automat's remediation text for this failure reads:
servicequotas:GetServiceQuota returned NoSuchResourceException for L-E619E033, which should not happen for a valid, current quota code; treat this as a possible defect in automat itself (a stale or wrong quota code) before assuming an AWS-side cause
So the emulator sends a correct caller off to hunt a bug in its own quota codes. That reasoning is sound against real AWS — which makes the emulator's silence expensive.
Related: list-service-quotas for an unknown service returns {"Quotas": []} and HTTP 200, where real Service Quotas returns NoSuchResourceException for an unrecognised ServiceCode. An empty list reads as "this service has no quotas", which is a different claim from "no such service".
Suggested behaviour
Seed organizations with the quotas a vending tool reads, at their real AWS defaults:
| Quota code | Name | Default |
|---|---|---|
L-E619E033 |
Maximum number of accounts | 10 (adjustable) |
L-29A0C5DF |
Maximum number of policies (SCP) | 1000 |
L-0F0F51F4 |
Maximum number of OUs | 1000 |
L-E619E033 is the one that matters — a low, adjustable, support-ticket-gated default is exactly the condition a test wants to reproduce, and RequestServiceQuotaIncrease already exists to model the rest of that story.
Activity
scttfrdmn commentedon Aug 14, 2026
Picking this up for v0.98.0. Two corrections to the suggested quota table before implementing it, both from AWS documentation rather than recall.
The SCP and OU defaults are 10× and 2× higher than stated
Both AWS Organizations endpoints and quotas and Quotas and service limits for AWS Organizations agree: "Service control policies in an organization — Each supported Region: 10,000" and "OUs in an organization — Each supported Region: 2,000".
This matters beyond fidelity: substrate already enforces those two numbers as
orgMaxSCPsPerOrg = 10000andorgMaxOUsPerOrg = 2000inemulator/organizations_state.go. Seeding 1,000 would make the quota a consumer reads disagree with the limit the same consumer hits — which is a worse failure than the quota being absent, because it looks authoritative.Same class of mixup as the one in #578, where the quoted SCP numbers (5 per target, 5,120 characters) turned out to be the RCP values. Here 1,000 is the default for declarative / backup / tag / chat-applications / Security Hub policies.
L-E619E033= 10, adjustable, is confirmed exactly as filed, and is the one the issue rightly says matters most.Only one of the three quota codes is verifiable
The endpoints page publishes a quota code only for adjustable quotas — those are the ones with a Service Quotas console link.
L-E619E033is there. SCPs-per-organization and OUs-per-organization are both non-adjustable, so neither page gives a code for them, and I could not confirmL-29A0C5DForL-0F0F51F4against any AWS source.The User Guide is explicit about why that is a live hazard:
So substrate will seed all three as suggested, with the corrected values, and the release notes will carry a
## Provenancesection recording that those two codes come from this report rather than from an AWS page — values documented and cited, codes best-effort. If they turn out wrong, the fix is a one-line table edit, andListServiceQuotaswill still return the right names and values.Also shipping the "actively misleads" part
Confirmed against the Service Quotas API model:
ListServiceQuotasdoes declareNoSuchResourceException, so the current 200 +{"Quotas": []}for an unrecognisedServiceCodeis wrong, exactly as the Related note says. That changes to the error. And sinceGetServiceQuotamust keep returningNoSuchResourceExceptionfor both an unknown service and an unknown quota code (the model declares only that one code), the two cases will be distinguishable by message — which is the part that sent automat off to hunt a non-existent bug in its own quota codes.One thing deliberately left out, filed separately rather than riding along:
ServiceQuotasPlugin.HandleRequestdiscards its*RequestContext, soRequestServiceQuotaIncreasefiles every increase under a hardcoded000000000000instead of the caller's account.feat(quotas): seed the organizations service quotas (#620) (#627)
scttfrdmn commentedon Aug 14, 2026
Shipped in v0.98.0 (#627). Your repro verbatim, live against
substrate server:All three quotas are seeded, at the two corrected values discussed above: 10 accounts (adjustable), 10,000 SCPs, 2,000 OUs. A test asserts each against
orgMaxAccounts/orgMaxSCPsPerOrg/orgMaxOUsPerOrgdirectly rather than against a copied literal, so the number a consumer reads and the number the Organizations plugin refuses at cannot drift apart silently — which was the point of correcting them rather than seeding what the issue said.The "Related" note is fixed too.
list-service-quotasfor an unrecognised service code now answersNoSuchResourceExceptioninstead of HTTP 200 with{"Quotas": []}— the model declares that error for the operation, and an empty list claims something different and false.get-service-quotaalso distinguishes its two refusals in the message now:Both are
NoSuchResourceExceptionbecause that is the only code the model declares for either, so the message is the sole place they can differ — and conflating them is what would send you to audit a quota code when the service name was wrong.Two things worth knowing that came out of the work:
L-29A0C5DFandL-0F0F51F4are best-effort codes. AWS publishes a quota code only for the adjustable quotas, and neither of those is adjustable, so their codes come from your report rather than from an AWS page. The values are documented and cited. The release notes say this under## Provenance, and the User Guide's advice — discover codes viaListServiceQuotasrather than hard-coding them — applies here as much as against real AWS.000000000000.ServiceQuotasPlugin.HandleRequestdiscards itsRequestContext, soRequestServiceQuotaIncreaserecords the request under a placeholder account rather than the caller's. It works — you can request and read back an increase againstL-E619E033— but the account on the record is wrong. Split out as Service Quotas: HandleRequest discards RequestContext, so every quota-increase request files under 000000000000 #624 rather than ridden along here.Closing. Thanks for both of these; finding them by driving a real consumer rather than by reading the model is exactly the provenance that made them worth prioritising.