Skip to content

--s3-read without --s3-write fails launch: MalformedPolicyDocument (empty PutObject Resource) #669

Closed

Description

@scttfrdmn

Summary

spawn launch --s3-read BUCKET without --s3-write fails before launch:

failed to attach scoped policy: ... PutRolePolicy ... MalformedPolicyDocument: Policy statement must contain resources.

taskStagingPolicy (cmd/task.go:1121) always appends the s3:PutObject statement. On the launch path (launch_single.go:1047), outputBuckets is empty and resultsBucket is "". dedupeBuckets drops the empty string, so bucketObjectARNs returns "" and the statement ends up with "Resource":[].

Fix

Wrap the PutObject statement in if len(writeB) > 0. Add a test for read-only --s3-read. Workaround for now: also pass --s3-write (no-cost if unused, but it grants write you didn't ask for).

Activity

  1. added
    bug
    on Oct 4, 2026
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

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions