mirror of
https://github.com/floci-io/floci.git
synced 2026-11-25 06:47:41 -05:00
EC2 froze every resource's owner to the configured default account at construction time, so OwnerId came back as 000000000000 no matter which account the request resolved to. Per-account isolation itself worked, but the reported owner contradicted what STS returns for the same credentials and what SQS embeds in its ARNs. The visible consequence was DescribeImages --owners: the filter was honored but matched against the frozen value, so filtering on the account actually in use returned nothing, and the common Terraform pattern of pinning an AMI to a known owner account failed with "Your query returned no results". Resolve the owner per request through callerAccountId() instead, for the ownerId fields, the generated ARNs and the self owner alias. Callers outside a request scope (startup seeding, internal provisioning) still fall back to the configured default account. Closes #3775