Skip to content

spawn logs: cache unreachable once EC2 forgets the instance; --region ignored; GetConsoleOutput not in IAM baseline #1160

Closed

Description

@scttfrdmn

Split from #1139.

Found while writing the logs and account-health guides for spore-host/spore-host#585 part 3. Checked in source.

  1. spawn logs can't use its console cache after EC2 stops listing the instance.
    • showTerminatedLog calls findRecentlyGone first and errors "no instance found…" (cmd/logs.go:137-141), before the cache read in consoleOutputCached (:195-199).
    • The cache exists to keep the log after AWS drops it, which is exactly when it can't be reached.
    • Fix: look the cache up by name or ID first.
  2. --region doesn't narrow logs/dns/connect lookups. resolveInstance calls ListInstances(ctx, "", "") (cmd/utils.go:177), which searches every region despite the Two inert flags: pipeline launch --wait never waits, and logs --region is dropped while shadowing the global --region #807 note.
  3. The IAM baseline lacks ec2:GetConsoleOutput, which spawn logs needs after termination. The site now lists it as an optional addition.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions