Skip to content

v0.162.0: every default-role launch fails on accounts with other inline policies — spored-policy-v1 pushes spored-instance-role past IAM's 10,240-byte inline limit #1573

Closed
spore-host/spore-host
#691

Description

@scttfrdmn

Symptom

On spawn v0.162.0 (Homebrew stable), launching with the default role fails before any instance is created:

$ spawn service --region us-east-1 --instance-type t3.small --name kc18-interactive --upload ./capacity --ttl 30m -- ./capacity
Launching t3.small in us-east-1...
launch the service instance: provision: set up spored IAM role: failed to attach policy to role:
attach spored-policy-v1 to spored-instance-role: operation error IAM: PutRolePolicy,
https response error StatusCode: 409, RequestID: b8a88e5c-b39f-49e8-8718-796ba76f69eb,
LimitExceeded: Maximum policy size of 10240 bytes exceeded for role spored-instance-role

Nothing launched and nothing leaked (checked: no instance with that Name tag; spawn orphans unchanged). The failure is in provision, so this should affect every launch that uses spored-instance-role, not only spawn service.

Cause

IAM caps the aggregate size of a role's inline policies at 10,240 bytes (whitespace not counted). spored-instance-role is shared account-wide, and on this account it already carries 13 inline policies, 7,676 bytes minified:

inline policy bytes
spored-policy (legacy, written by ≤ v0.161.0) 2,775
spored-instance-policy 303
omics-demo-* (4) 1,765
microbiome-demo-* (6) 2,137
calque-spike-access 696

#1558/#1560 (v0.162.0) deliberately writes the grants to a new name, spored-policy-v<schema>, and leaves the legacy spored-policy in place, because IAM grants the union and an older CLI must not be able to strip a newer one's grants. That's the right call for correctness, but it roughly doubles spored's share of a fixed, shared 10 KB budget, and other tenants of the role already use about half of it. Any account where spored-instance-role has picked up a few thousand bytes of other inline policies now hits LimitExceeded on every launch with the default role.

Why it's easy to miss

The budget is per role and shared with whatever else attached inline policies to it. A clean test account has headroom, so the size increase only shows up on a lived-in account.

Possible directions (yours to choose)

Context

Found running go-notebook's KC18 (scttfrdmn/go-notebook#101): spawn service driving a go-notebook binary. go-notebook's side is unchanged and verified at $0 (ready line, --dry-run plan correct). The interactive run is blocked here.

Activity

  1. added
    bug
    on Nov 10, 2026
  2. added this to the Hardening milestone on Nov 10, 2026
  3. scttfrdmn commented on Nov 10, 2026

    @scttfrdmn
    ContributorAuthor

    Owner approved the fix (2026-11-10). Target: a v0.163.1 patch.

    Before release: a live check in spore-host-dev against a throwaway role padded close to the inline limit, with real Create/Attach/Put calls.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions