Repository navigation
Description
What happened
Two spawn launch calls in the same account, same region, same campaign, minutes-to-days apart, got different IAM instance profiles, and only one of them can reach the bucket the workload uses.
| instance | instance profile | role | can read/write the campaign bucket? |
|---|---|---|---|
i-0c18f6171e560834c (launched 2026-08-17) |
spawn-instance-d1029e0a |
spawn-instance-d1029e0a |
yes — inline spawn-custom-policy scopes ListBucket to corpus/* + registry/* and PutObject/GetObject to corpus/pilot/* |
i-01040759abdfa2076 (launched 2026-08-20T06:40:26Z) |
spored-instance-profile |
spored-instance-role |
no — its S3 policies are scoped to unrelated buckets (scttfrdmn-microbiome-demo, omics-demo, etc.) |
The second instance 403s on the first S3 call:
$ aws s3api head-object --bucket <campaign-bucket> --key corpus/pilot/stack/gpaw-26.7.0/....whl
An error occurred (403) when calling the HeadObject operation: Forbidden
Why it costs something
Nothing fails at launch. The instance boots, SSH works, the toolchain installs, a conda env builds — and the 403 lands ~5 minutes in, on a c8g.48xlarge at $7.657/h, inside a detached provisioning script. In our case it killed the run under set -e, the log froze, and the wasted window was only caught by polling. An unattended pipeline would have burned to its TTL having produced nothing.
The 403 is also on HeadObject, i.e. before any digest is computed, so a provisioning step whose whole job is "install this artifact by sha256" fails in a way that looks like a missing object rather than a missing permission.
Suggested fixes, roughly in order of value
- Preflight the profile against the workload at launch, and fail there. If
spawn launchaccepts a bucket/prefix (or can infer one from--tag Campaign=...reuse, or from an explicit--s3 s3://bucket/prefix), do oneHeadBucket/ListObjectsV2from the instance as part of readiness and refuse the launch on 403. A launch that cannot reach its data is better failed at second 30 than at minute 5. - Make profile selection explicit and deterministic.
--instance-profile NAME(and echoing the resolved profile inspawn launch's output and inspawn list) would have made this a one-line fix instead of an investigation. Right now the resolved profile appears nowhere in the CLI output — I had to read it out ofec2:DescribeInstances. - Document the fallback order. It is not clear from the docs why one launch got a per-launch
spawn-instance-<hash>profile and another got a pre-existing sharedspored-instance-profile. If the rule is "reuse an existing profile when one matches some heuristic", that heuristic is load-bearing for data access and should be stated. - Consider reporting the profile in
spawn list/spawn describe. Alongside TTL and on-complete, since it determines whether the instance can save its own results.
Related, from the same instance's tags (separate but adjacent)
spawn-instance-<hash> profiles are not cleaned up on termination — 8 exist in this account dating back to 2026-05-17 with only 1 running instance. That is arguably the safe default (reuse works, no dangling-permission surprise mid-run), but it is worth deciding deliberately rather than leaving it as an artifact, and it interacts with fix (2): a user told to pass --instance-profile will reasonably reach for one of those.
Versions: spawn:version = 0.101.0, spawn:spored-version = 0.101.0.
Activity
fix: launch attaches an instance profile with no access to the worklo…
fix: launch attaches an instance profile with no access to the worklo…
fix(fsx): grant the service-linked role on the no-IAM-flags path too
fsx: grant the service-linked-role creation an S3 association needs, …