Skip to content

spawn launch --os windows without --ami silently launches Amazon Linux, and previews it as Windows #884

Closed

Description

@scttfrdmn

Found preparing the real Windows validation of #879. spawn launch x --os windows --instance-type m7i.large --dry-run:

AMI:          ami-097855b862d5b1eb2  (windows)
Rate:         \$0.1008/hr on-demand (live)

ami-097855b862d5b1eb2 is al2023-ami-2023.12.20261012.0-kernel-6.18-x86_64 — Amazon Linux, labelled (windows).

Why

ensureAMIAndPreflight auto-detects with GetRecommendedAMI, which always returns AL2023, and only afterwards applies --os via resolveTargetOS — as a label. The real launch shares this path, so it would boot Linux with Windows <powershell> user-data: the PowerShell never runs, spored is never installed, and the instance has no lifecycle.

--os's help says it is for forcing the OS of a custom AMI whose platform metadata is unset, and docs/windows-beta-guide.md always pairs it with --ami. So --os windows with no --ami is unsupported — but nothing refuses it, and the preview actively says it is Windows.

Also: the preview prices Windows at the Linux rate

\$0.1008/hr is m7i.large's Linux on-demand price. With the Windows licence it is about $0.19/hr, so "Max cost" understates a Windows launch by roughly half — the cost-control surface being wrong in the cheap direction. Worth checking --estimate-only too.

Fix

  • Refuse --os windows with an auto-detected AMI — or resolve a Windows Server AMI from /aws/service/ami-windows-latest/... — never launch AL2023 under a Windows label.
  • Price a Windows target with the Windows on-demand rate (truffle can distinguish), in both the dry-run and --estimate-only.
  • Gate both against the resolved AMI's actual platform, not the flag.

Activity

  1. added
    bug
    area:launch
    area:windows
    on Oct 13, 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

    area:launcharea:windowsbug

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions