Skip to content

spawn command reference โ€‹

spawn launches, connects to, and manages ephemeral EC2 instances. This is the exhaustive command and flag reference. New to spawn? Start with Your first instance and the MPI/cohort guide.

Generated reference

Each section below is generated from the spawn CLI itself and synced on every release, so the commands and flags match the shipped binary. Deprecated commands are left out. For task-oriented walkthroughs see the guides.

Global flags โ€‹

These apply to every spawn command.

FlagShortTypeDefaultDescription
--accessibilityboolEnable accessibility mode (implies --no-emoji)
--accountstringExpected AWS account ID (optional guard)
--langstringLanguage for output (en, es, fr, de, ja, pt)
--no-colorboolDisable colorized output
--no-emojiboolDisable emoji in output
--output-ostringtableOutput format (table, json)
--profilestringAWS named profile (overrides SPORE_PROFILE/AWS_PROFILE and the shared config)
--regionstringDefault AWS region (overrides SPORE_REGION/AWS_REGION and the shared config)
--verbose-vboolEnable verbose output (also copies the audit trail and diagnostic log lines, normally kept in ~/.spawn/audit.log and ~/.spawn/spawn.log, to stderr)

spawn ami โ€‹

Create, list, copy and delete AMIs created by spawn.

Examples: spawn ami list spawn ami list --stack pytorch --arch arm64 spawn ami create my-instance --name pytorch-2.4-cuda12 spawn ami copy pytorch-2.4-cuda12 --to-region us-east-2 --wait

spawn ami

spawn ami copy โ€‹

Copy a spawn-managed AMI to another region, keeping its spawn tags on the new AMI and on every snapshot backing it, plus spawn:copied-from=<ami-id>@<region>. The copy is spawn-managed like its source: 'spawn ami list --region <region>' lists it, 'spawn footprint' counts it and its snapshots, and 'spawn ami delete <copy-id> --region <region>' removes it.

Only AMIs spawn created (tagged spawn:managed=true) can be copied.

Encryption: an encrypted source is copied encrypted with the target region's default EBS key (aws/ebs), because a KMS key cannot be used outside its own region. --kms-key names a key in the target region instead, and also encrypts the copy of an unencrypted source.

The copy is independent of its source: deleting the source does NOT delete its copies. Delete each copy in its own region.

Needs ec2:DescribeImages in the source region and ec2:CopyImage and ec2:CreateTags in the target region.

Examples: spawn ami copy ami-0123456789abcdef0 --to-region us-east-2 spawn ami copy pytorch-2.4-cuda12 --region us-east-1 --to-region us-west-2 --wait spawn ami copy ami-0123456789abcdef0 --to-region eu-west-1 --kms-key alias/research

spawn ami copy <ami-id|name> --to-region <region> [flags]

Flags:

FlagShortTypeDefaultDescription
--kms-keystringKMS key in the target region to encrypt the copy with (default: aws/ebs if the source is encrypted)
--namestringName for the copy (default: the source AMI's name)
--regionstringRegion the source AMI is in (default: current region from AWS config)
--to-regionstringRegion to copy the AMI to (required)
--wait-timeoutduration1h0m0sHow long --wait waits before giving up (the copy itself continues)
--waitboolWait for the copy to become available

spawn ami create โ€‹

Create an AMI from a running instance

spawn ami create <instance-id-or-name> [flags]

Flags:

FlagShortTypeDefaultDescription
--descriptionstringDescription for the AMI
--forceboolCreate the image even if spawn could not remove its --command run-state files (completion file, exit code, the embedded command) from the instance first; they will be baked into the AMI
--namestringName for the AMI (required)
--rebootboolReboot instance before creating AMI (default: no-reboot)
--tagstringArrayTags in key=value format
--waitboolWait for AMI to become available

spawn ami delete โ€‹

Deregister a spawn-managed AMI and delete its backing EBS snapshots in one step. If the AMI was produced by EC2 Image Builder (e.g. 'spawn image import'), the corresponding Image Builder image resource is also deleted so its name/version is freed.

This is irreversible. Use 'spawn ami list' to find AMIs.

Examples: spawn ami delete ami-0123456789abcdef0 spawn ami delete ami-0123456789abcdef0 --region us-east-1 --yes

spawn ami delete <ami-id> [flags]

Flags:

FlagShortTypeDefaultDescription
--regionstringAWS region (default: current region from AWS config)
--yes-yboolSkip the confirmation prompt

spawn ami list โ€‹

List spawn-managed AMIs

spawn ami list [flags]

Flags:

FlagShortTypeDefaultDescription
--archstringFilter by architecture (x86_64 or arm64)
--deprecatedboolShow deprecated AMIs
--gpustringFilter by GPU support (true or false)
--regionstringAWS region (default: current region from AWS config)
--stackstringFilter by stack (spawn:stack tag)
--versionstringFilter by version (spawn:version tag)

spawn ami snapshots โ€‹

Show the EBS snapshots that back an AMI, with size, state, and whether each snapshot is shared with other AMIs (which is why 'spawn ami delete' keeps shared snapshots instead of deleting them).

Examples: spawn ami snapshots ami-0123456789abcdef0 spawn ami snapshots ami-0123456789abcdef0 -o json

spawn ami snapshots <ami-id> [flags]

Flags:

FlagShortTypeDefaultDescription
--regionstringAWS region (default: current region from AWS config)

spawn app โ€‹

Launch streamable research applications in the cloud.

Each application is pre-configured with the right instance type, NICE DCV for browser-based streaming, and an automatic stop when idle.

Apps you can launch depend on your account: public images are available to everyone; private images appear only if your account can pull them. Bring your own image with --image, or add bindings in ~/.spawn/catalog.yaml (--catalog).

Out of the box, code-server, jupyter, openrefine and desktop launch. The other apps (paraview, chimerax, qgis, ...) are "recipe available": spore.host ships the build recipe, and you supply the image you built with --image or a catalog binding. 'spawn app list' shows which is which for your account.

Examples: spawn app list # show apps and whether each is launchable spawn app launch jupyter # JupyterLab in the browser spawn app launch code-server --region us-west-2 spawn app launch desktop --spot --ttl 4h

A recipe app, with the image you built from its recipe: โ€‹

spawn app launch paraview --image 123456789012.dkr.ecr.us-east-1.amazonaws.com/paraview:5.13.2

spawn app

Flags:

FlagShortTypeDefaultDescription
--catalogstringLocal catalog overlay file (default: $SPAWN_CATALOG or ~/.spawn/catalog.yaml)

spawn app launch โ€‹

Launch a catalog application via NICE DCV

spawn app launch <app-name> [flags]

Flags:

FlagShortTypeDefaultDescription
--app-versionstringApp container image tag to launch (default: catalog default; see 'spawn app list')
--health-pathstringHTTP path probed for web-app readiness (default "/")
--idle-timeoutstringStop when DCV has no clients for this duration (default: catalog default)
--imagestringLaunch a BYO container image for this app (overrides the catalog binding), e.g. 123456789012.dkr.ecr.us-east-1.amazonaws.com/paraview:5.13.2
--instance-typestringOverride instance type (default: first catalog family + .xlarge)
--namestringSession name (default: <app>-<timestamp>)
--no-openboolWrite session file but do not open browser automatically
--no-web-authboolDisable the spored :443 access-token gate for a web app (the app must provide its own auth)
--regionstringAWS region (default: from AWS config)
--spotboolUse Spot pricing
--ttlstring8hHard termination deadline (e.g. 4h, 8h, 1d). Always set: idle only stops the instance, so the TTL is what ends an abandoned session
--web-argstringArrayExtra argument for a web app's container, repeatable (e.g. --web-arg=--bind-addr=0.0.0.0:8080)
--web-portintLaunch --image as a web-UI app served on this container port (e.g. 8080 for code-server, 8888 for Jupyter); spored fronts it with TLS on :443

spawn app list โ€‹

List all streamable applications in the catalog

spawn app list

spawn array โ€‹

Manage job arrays launched with --job-array-name / --count.

Members are grouped by their job-array tags, so these work without any server-side record:

spawn array status data-proc spawn array logs data-proc --index 3 spawn array collect data-proc ./results spawn array cancel data-proc --pending

spawn array

spawn array cancel โ€‹

Terminate a job array's instances

spawn array cancel <array-name> [flags]

Flags:

FlagShortTypeDefaultDescription
--pendingboolOnly terminate members that are not actively running
--regionstringRegion to search (default: all regions)
--yes-yboolSkip the confirmation prompt

spawn array collect โ€‹

Report where each member's results are (per-index)

spawn array collect <array-name> [dest-dir] [flags]

Flags:

FlagShortTypeDefaultDescription
--output-dirstringDestination directory hint for results
--regionstringRegion to search (default: all regions)

spawn array logs โ€‹

Fetch the tail of one array member's log.

Selects the member by --index (the sparse job-array index, as shown by 'spawn array status'), then reads /var/log/spawn-command.log (default) or /var/log/spored.log (--which spored). Uses the instance's SSH key when one is on disk, else falls back to SSM (keyless/lagotto-launched members).

spawn array logs <array-name> [flags]

Flags:

FlagShortTypeDefaultDescription
--indexintArray member index to fetch logs for
--linesint200Number of trailing lines to show
--regionstringRegion to search (default: all regions)
--whichstringcommandWhich log to tail: "command" or "spored"

spawn array retry โ€‹

Relaunch the indexes of a job array that never came up or have died.

retry reads the local launch record spawn wrote at launch (~/.config/spore/arrays/), so it faithfully reuses the original AMI, subnet, security groups, user-data, TTL, and command โ€” none of which a surviving member's tags fully carry. It relaunches only indexes with no running/pending member, regrouped under the original array so 'spawn array status' sees them.

Note: retry must run from the machine that launched the array (that's where the launch record lives). It launches real, billable instances โ€” you'll be asked to confirm, or pass --yes.

spawn array retry <array-name> [flags]

Flags:

FlagShortTypeDefaultDescription
--failedboolRelaunch the missing/failed indexes (required)
--regionstringRegion to search (default: all regions)
--yes-yboolSkip the confirmation prompt

spawn array status โ€‹

Show a job array's members, requested vs launched, and missing indexes

spawn array status <array-name> [flags]

Flags:

FlagShortTypeDefaultDescription
--regionstringRegion to search (default: all regions)

spawn availability โ€‹

Display availability statistics based on historical launch success/failure data.

This helps identify regions with proven capacity for specific instance types. Statistics are passively collected from actual launch attempts.

spawn availability [flags]

Flags:

FlagShortTypeDefaultDescription
--instance-typestringInstance type to check (required)
--regions-rstringSliceRegions to check (comma-separated or repeated; default: common regions)

spawn burst โ€‹

Launch EC2 instances that will register with the hybrid registry and coordinate with local instances to process workloads.

This enables "cloud bursting" where local compute capacity can be extended with on-demand cloud resources.

On each instance, spored writes the job array's live members (the other burst instances and the local nodes) to /etc/spawn/job-array-peers.json, a JSON array of {index, instance_id, ip, dns, provider}, and rewrites it every minute so members that join later appear. spored status shows the list and its age.

Every instance gets a TTL (--ttl, default 8h) and terminates when it expires.

Each instance installs and verifies spored at boot, the same way spawn launch does, so any Amazon Linux 2023 image works. Without --ami, burst uses the newest AMI this account owns whose name matches spawn-* and that fits the instance type (architecture, Linux, GPU), else the standard Amazon Linux 2023 AMI for the instance type, as spawn launch picks it.

spawn burst [flags]

Examples:

sh
# Launch 10 instances to help process a job array
  spawn burst --count 10 --job-array-id my-array --instance-type c5.4xlarge

  # Launch with specific AMI
  spawn burst --count 5 --job-array-id genomics --ami ami-abc123

  # Launch Spot instances for cost savings, terminated after 2 hours
  spawn burst --count 20 --job-array-id simulation --spot --ttl 2h

Flags:

FlagShortTypeDefaultDescription
--amistringLinux AMI ID (default: the newest self-owned spawn-* AMI that fits --instance-type, else Amazon Linux 2023)
--countint1Number of instances to launch
--idle-timeoutstringAlso terminate an instance after it has been idle this long (e.g. 1h). Empty disables the idle terminate.
--instance-profilestringAttach this EXISTING IAM instance profile by name instead of the default spored-instance-profile, which spawn creates or reuses as spawn launch does. Its role must let spored read and write its own tags, terminate itself, and use the spawn-hybrid-registry table.
--instance-typestringt3.microEC2 instance type
--job-array-idstringJob array ID to join (required)
--job-array-namestringJob array name, used by spawn array status/cancel (defaults to the job array ID)
--keep-on-errorboolKeep instances instead of terminating them when the burst fails after launching some, or when an instance's spored never comes up. A kept instance whose spored is not confirmed has no TTL/idle enforcement
--key-namestringSSH key pair name
--security-group-idsstringSliceSecurity group IDs (comma-separated or repeated)
--spotboolUse Spot instances
--subnet-idstringSubnet ID
--ttlstring8hTerminate each instance after this duration (e.g. 30m, 2h, 36h). Required to be positive: burst instances always have a TTL.

spawn capacity-block โ€‹

Purchase and manage EC2 Capacity Blocks for ML.

Discover purchasable offerings with 'truffle capacity-blocks', then purchase one here. After purchase, launch into it with: spawn launch <name> --reservation-id <id> --capacity-block --az <reservation-az>

spawn capacity-block

spawn capacity-block purchase โ€‹

Purchase a Capacity Block for ML from an offering id (from 'truffle capacity-blocks').

โš ๏ธ A Capacity Block is billed UP FRONT and is NON-REFUNDABLE โ€” the full block duration is charged at purchase. This is the single most expensive action spawn can take. The purchase requires you to TYPE three confirmations (the exact price, 'purchase <offering-id>', and an acknowledgement phrase) and refuses to run on a non-interactive terminal. Use --dry-run first to preview the price and terms without buying anything.

The offering's instance type, count, and duration must be supplied so the exact offering can be re-validated (and its current price re-confirmed) immediately before purchase.

spawn capacity-block purchase <offering-id> [flags]

Flags:

FlagShortTypeDefaultDescription
--countint321Number of instances in the block
--dry-runboolPreview the price and terms without purchasing (no charge, no write API call)
--duration-hoursint32Capacity Block duration in hours (required)
--instance-typestringInstance type of the offering, e.g. p5.48xlarge (required)
--platformstringLinux/UNIXInstance platform (Linux/UNIX, Windows, ...)
--regionstringAWS region of the offering (required)
--tagstringArrayTag to apply to the reservation (key=value; repeatable)

spawn cleanup โ€‹

Remove the shared AWS resources spore.host created (tagged spawn:managed), in dependency order. Running instances are NEVER removed โ€” stop or terminate them first. A cluster placement group that still has members is reported and skipped, since EC2 refuses to delete one โ€” re-run once those instances are gone.

Preview what would be removed with --dry-run; otherwise cleanup prompts for confirmation (skip with --yes) and then deletes. By default it acts only on resources you created; --all widens to every principal in the account.

--elastic-ips releases only the Elastic IPs spawn allocated for multi-interface EFA launches whose instance is gone (terminated, or no longer known to EC2) and that are attached to nothing. Each one bills and counts toward the region's Elastic IP limit. This mode touches nothing else, so running instances do not block it. spawn list and spawn status warn about these addresses and print the command.

--buckets removes only spawn's own spawn-staging-<account>-<region> and spawn-results-<account>-<region> buckets, and only once they have been empty for 7 days. It never deletes an object: a bucket holding anything at all (objects, old versions, delete markers, an unfinished multipart upload) is kept. S3 records no "empty since", so the first run that finds a bucket empty tags it spawn:empty-since and a later run deletes it once that tag is 7 days old; a run that finds it in use removes the tag, and so does a launch that uses it. A results bucket with lifecycle rules (spawn results lifecycle --apply) is kept, since a re-created one would not get them back. The staging bucket is never listed (no spawn role may list it): S3 itself refuses to delete it if it holds anything. spawn re-creates either bucket the next time it needs it. Every call names your account as the expected bucket owner. --dry-run writes nothing, not even the tag. The TTL reaper can do the same on its own schedule (REAPER_EMPTY_BUCKETS).

--instance-roles deletes only the per-task spawn-instance-<hash> IAM roles and instance profiles that 'spawn task run' and --iam-policy launches create, one per distinct set of permissions, and the per-pool spawn-instance-pool-<hash> ones 'spawn pool create' makes (and spawn-pool-worker-<hash>, their name before v0.147.0) when the pool was never drained; a pool role also needs its spawn:pool-run-id tag to match its name. A role goes only when it and its profile are tagged spawn:managed=true, no instance in any enabled region (pending through stopped) has the profile attached, the role and profile are at least 24 hours old, and the role is unused for 24 hours. A role an enabled schedule names (its params' iam_role) is kept until the schedule is paused, cancelled or runs out; the schedules are read from spawn's infra account (as 'spawn schedule' does), and if they cannot be read no role is deleted. The shared spored-instance-role is never touched. IAM is global, so this always checks every enabled region whatever --region says, and covers every principal's roles. The TTL reaper applies the same rule (REAPER_INSTANCE_ROLES). It also deletes spawn's spored managed policies (/spore-host/spored-*-v<N>) that no role has attached and that are at least 24 hours old; the reaper detaches them from the roles it deletes but does not delete them.

--pool-queues deletes only the SQS queues of pools nobody drained (spawn-pool-<run id>) and the task specs their submitters staged in the results bucket (staging/pool-specs/<run id>/). A queue goes only when it is tagged spawn:managed=true with a spawn:pool-run-id tag matching its name, no instance in any enabled region (pending through stopped) holds the pool's worker profile or tag, it holds no messages, and it is at least 24 hours old. A run's specs go once its queue is gone, no instance is the pool's, and the newest was staged 24 hours ago. Queues made before v0.147.0 are untagged and kept; 'spawn pool drain --run-id <id>' deletes one. Queues are regional, so --region / --all-regions choose where to look; the worker check always covers every enabled region. The TTL reaper applies the same rule (REAPER_POOL_QUEUES).

--schedule-params deletes only schedule params objects (spawn-schedules-<region>/schedules/<id>/params.yaml) that no schedule record names any more: a one-time schedule whose firing failed, or an --end-after schedule that never fired past its end, leaves its params behind once its record expires. An object goes only when no record in the spawn-schedules table has its id or names it (the whole table is read; if it cannot be, nothing is deleted), it is at least 30 days old (the record's TTL margin, so a schedule being created now is safe), and it is tagged as a schedule's params (Component=scheduler, a matching ScheduleID, an id of the form spawn gives a schedule). A batch queue config, which shares the bucket and key layout, is never deleted. The schedules are read from spawn's infra account (as 'spawn schedule' does), in every region's bucket, whatever --region says. The TTL reaper applies the same rule (REAPER_SCHEDULE_PARAMS).

A log of everything removed is written to ~/.spawn/cleanup-<timestamp>.log.

spawn cleanup [flags]

Flags:

FlagShortTypeDefaultDescription
--all-regionsboolClean up every enabled region
--allboolInclude resources created by other principals (default: only yours)
--bucketsboolDelete only spawn's own staging and results buckets that have been empty for 7 days; no object is ever deleted and nothing else is touched
--dry-runboolPreview what would be removed without deleting anything
--elastic-ipsboolRelease only orphaned spawn launch Elastic IPs (unassociated, instance gone); nothing else is touched
--instance-rolesboolDelete only unused per-task and per-pool spawn-instance-* (and pre-v0.147 spawn-pool-worker-*) IAM roles and instance profiles (no instance uses them, 24h old and unused); nothing else is touched
--pool-queuesboolDelete only the SQS queues (and staged task specs) of pools nobody drained: spawn-tagged, empty, 24h old, no instance is the pool's; nothing else is touched
--regionstringAWS region (default: current region from AWS config)
--schedule-paramsboolDelete only schedule params objects no schedule record names (30 days old, tagged as a schedule's params, never a queue config); nothing else is touched
--yes-yboolSkip the confirmation prompt

spawn connect โ€‹

Aliases: ssh

Connect to a spawn-managed instance via SSH.

Automatically finds your SSH key and connects. Falls back to AWS Session Manager if SSH is unavailable.

Examples:

Connect by instance ID โ€‹

spawn connect i-1234567890abcdef0

Connect by name โ€‹

spawn connect my-instance

spawn connect <instance-id> [-- <command>...] [flags]

Flags:

FlagShortTypeDefaultDescription
--keystringSSH private key path
--no-startboolDo not automatically start a stopped/hibernated instance
--portint22SSH port
--rdp-portint13389Windows --rdp --via-ssm: local port for the SSM RDP tunnel
--rdpboolWindows: open a Remote Desktop (RDP) connection (decrypts the Administrator password)
--session-managerboolUse AWS Session Manager instead of SSH. On a DCV app instance, opens a shell instead of the streaming session. A one-shot command (after --) runs over SSM RunCommand instead (as the SSH user, with its exit status; no stdin, output when it exits), as it does whenever connect cannot use SSH
--sshboolUse SSH. Linux: skip the security-group check and SSH even when no group appears to allow the port (by default connect uses SSM then). Windows: SSH in (as Administrator, over OpenSSH) instead of opening a PowerShell-over-SSM session
--tty-tboolAllocate a pseudo-terminal (ssh -t) for the remote command. Line-buffers remote stdout so a long-running command's progress streams live instead of appearing only when it exits (useful when watching a multi-minute run, or so output isn't lost if the instance auto-terminates mid-run). Off by default: a PTY MERGES stdout and stderr and can mangle binary/structured output, so leave it off when piping such output through connect.
--userstringSSH username (default: the instance's spawn:local-username tag, else ec2-user)
--via-ssmboolWindows --rdp: tunnel RDP over an SSM port-forwarding session instead of connecting to the public IP

spawn cost โ€‹

Display a detailed cost breakdown.

For a parameter sweep or job array, shows the full breakdown:

  • Resource costs (compute, storage, network)
  • Cloud economics (effective cost/hr, utilization, savings)
  • Time breakdown (running vs stopped hours)
  • Budget status (if budget was set)
  • Cost by region and instance type

For a single instance launched with 'spawn launch' (which has no sweep cost record), shows an on-the-fly estimate of its cost so far: the on-demand rate (spawn:price-per-hour tag) ร— its compute time across every stop and start (spored's spawn:compute-seconds; compute bills only while running) โ€” for a Spot instance, the Spot price spored samples, integrated over that compute time (spawn:spot-accrual), or the on-demand rate, labelled, when spored could not read it โ€” plus EBS over the time since first launch when spored has measured it (the spawn:cost-footprint tag, or spawn:ebs-hourly-cost from an older spored; EBS bills while stopped too), plus $0.005/hr for each public IPv4 address spored has recorded (an Elastic IP bills while stopped too). The total is the figure --cost-limit is enforced against.

Examples: spawn cost sweep-20260124-140530 spawn cost my-devbox

spawn cost <sweep-id | instance>

spawn defaults โ€‹

Manage default values for spawn launch flags.

Defaults are stored in ~/.spawn/config.yaml and applied whenever the corresponding flag is not explicitly provided on the command line.

Valid keys: slack-workspace Experimental, needs SPAWN_EXPERIMENTAL_CHAT=1: Slack workspace ID for lifecycle notifications (e.g. T03NE3GTY) active-processes Process names to monitor for idle detection (e.g. rsession) active-ports TCP ports to monitor for active connections (e.g. 8787) idle-timeout Default idle timeout duration (e.g. 30m, 1h) hibernate-on-idle Hibernate instead of stopping on idle (true/false) bootstrap-egress --bootstrap-egress for --no-public-ip launches (none/proxy) compute-profile AWS profile for the compute account, where instances and detached sweep members launch, when SPAWN_COMPUTE_PROFILE is unset. Unset, spawn uses your own profile (--profile / AWS_PROFILE) or the ambient credentials. For split setups that launch in a dedicated account (e.g. spore-host-dev).

Examples: spawn defaults set slack-workspace T03NE3GTY spawn defaults set active-processes rsession spawn defaults set idle-timeout 1h spawn defaults set compute-profile spore-host-dev spawn defaults list spawn defaults unset active-processes

spawn defaults

spawn defaults list โ€‹

List all default launch values

spawn defaults list

spawn defaults set โ€‹

Set a default launch value

spawn defaults set <key> <value>

spawn defaults unset โ€‹

Remove a default launch value

spawn defaults unset <key>

spawn dns โ€‹

Manage DNS records for spawn instances.

spored registers <name>.<account-base36>.<domain> itself when an instance boots: the name is --name (or --dns), unless the launch passed --no-dns, and the domain is spore.host unless the launch targeted a custom DNS deployment (--dns-domain; see docs/custom-dns.md).

register and delete act on the zone and updater the instance's spawn:dns-domain / spawn:dns-endpoint tags name, unless --domain / --endpoint say otherwise.

Examples:

List DNS-enabled instances โ€‹

spawn dns list

Register a DNS name for an instance โ€‹

spawn dns register i-1234567890abcdef0 my-server

Delete an instance's DNS record and its DNS tags โ€‹

spawn dns delete i-1234567890abcdef0

spawn dns [flags]

Flags:

FlagShortTypeDefaultDescription
--domainstringDNS zone (default: the instance's spawn:dns-domain, else SPAWN_DNS_DOMAIN / ~/.spawn/config.yaml / SSM, else spore.host)
--endpointstringCustom DNS updater Function URL (default: the instance's spawn:dns-endpoint, else the same chain, else spore.host's)

spawn dns delete โ€‹

Delete DNS record for an instance

spawn dns delete <instance-id> [flags]

Flags:

FlagShortTypeDefaultDescription
--yes-yboolSkip the confirmation prompt

spawn dns list โ€‹

List DNS-enabled spawn instances

spawn dns list [flags]

Flags:

FlagShortTypeDefaultDescription
--all-aboolShow all instances (including those without DNS)

spawn dns register โ€‹

Register DNS name for an instance

spawn dns register <instance-id> <dns-name>

spawn doctor โ€‹

Run a read-only preflight of everything a first launch needs: your tools, AWS credentials, the resolved account and region, the EC2 and IAM permissions spawn uses, a usable VPC/subnet, an SSH key, Session Manager, the spored instance profile, and optional features (reaper backstop, Route 53).

Each check reports pass (โœ“), warning (โš , optional feature unavailable), or fail (โœ—, a core prerequisite is missing). It launches nothing and changes nothing.

If 'spawn doctor' passes, the Quick Start should work as written. On an institution-managed AWS account, share the failing IAM checks with your cloud administrator alongside the IAM baseline (docs: reference/iam-permissions).

Exit codes: 0 = ready (no failures), 1 = a core prerequisite failed.

Examples: spawn doctor spawn doctor --region us-west-2 spawn doctor -o json

spawn doctor [flags]

Flags:

FlagShortTypeDefaultDescription
--regionstringAWS region to check (default: your resolved region)

spawn egress-proxy โ€‹

A --no-public-ip launch with --bootstrap-egress proxy, in a VPC with no NAT, fetches spawn's own bootstrap downloads through a spawn egress proxy: one t4g.micro per VPC running 'spored egress-proxy', with two security groups, spawn-egress-proxy-<vpc> and spawn-egress-clients-<vpc>. The launch finds or creates it. A proxy lives at most 6 days and ends sooner when unused for its idle period (72h by default); the TTL reaper is the backstop for both, and its managed-network sweep deletes the groups once nothing uses them.

These commands show, delete and upgrade them. The region is the global --region, else your configured region.

spawn egress-proxy

spawn egress-proxy delete โ€‹

Terminate the egress proxy instances of a VPC (--vpc) or of every VPC in the region (--all), wait until they are terminated, then delete the two security groups: the proxy's group first, then the clients group.

Only instances spawn can tell it launched as the VPC's proxy are terminated: tagged spawn:egress-proxy=<vpc>, carrying exactly the proxy group, running with spored-instance-profile, and with a deadline no later than launch plus the proxy's life. A tagged instance that fails these checks is refused, left alone, and named with the reason; the command then exits non-zero.

A clients group that member instances still carry is kept, and its users are named; the TTL reaper's managed-network sweep deletes it once nothing uses it. Members that have finished their bootstrap do not use the proxy, so deleting it does not affect them.

spawn egress-proxy delete [flags]

Flags:

FlagShortTypeDefaultDescription
--allboolDelete the proxies and groups of every VPC in the region
--dry-runboolPrint what would be terminated and deleted, and change nothing
--vpcstringThe VPC whose proxy and groups to delete (a vpc- ID)
--yes-yboolDo not ask for confirmation

spawn egress-proxy status โ€‹

Show every instance tagged spawn:egress-proxy in the region (or in --vpc): its state, address, the spawn release that launched it, its deadline, the idle activity it published, and whether the next --bootstrap-egress proxy launch would reuse it (and if not, why). For each VPC, also the two security groups and how many network interfaces use the clients group.

The activity is what the proxy last published, and spored rewrites it at most every 10 minutes in steady use, so it can trail the proxy's real traffic: the last activity is "at or after" the time shown, and an idle expiry is "no earlier than" the one shown. The proxy itself ends on its own current clock.

-o json prints the same as JSON, with stable snake_case keys.

Read-only: ec2:DescribeInstances and ec2:DescribeSecurityGroups.

spawn egress-proxy status [flags]

Flags:

FlagShortTypeDefaultDescription
--all-regionsboolShow every region enabled in this account
--vpcstringShow only this VPC (a vpc- ID)

spawn egress-proxy upgrade โ€‹

Launch a fresh egress proxy at this CLI's version in the VPC named by --vpc, through the same find-or-create a launch uses, wait until it is ready, then terminate the old one (unless --keep-old, which leaves it to expire on its own). The new proxy keeps the idle period the old one published, else 72h.

If the VPC's proxy is already at this CLI's version with more than 12 hours left, it is reported as current and nothing changes. A VPC with no proxy is left without one: the next --bootstrap-egress proxy launch creates it.

A member that is mid-bootstrap through the old proxy when it is terminated can fail its download; members that have finished their bootstrap do not use it.

spawn egress-proxy upgrade [flags]

Flags:

FlagShortTypeDefaultDescription
--keep-oldboolLeave the old proxy running until it expires on its own
--vpcstringThe VPC whose proxy to upgrade (a vpc- ID; required)
--yes-yboolDo not ask for confirmation

spawn extend โ€‹

Extend the TTL (time-to-live) for a spawn-managed instance.

Prevents automatic termination by extending the TTL duration.

Duration format: 1h, 2h30m, 24h, etc.

Examples:

Extend by 2 hours โ€‹

spawn extend i-1234567890abcdef0 2h

Extend by name โ€‹

spawn extend my-instance 8h

spawn extend <instance-id-or-name> <duration> [flags]

Flags:

FlagShortTypeDefaultDescription
--cost-limitfloat64Set the instance's cost limit to this amount in USD. Without it (or --raise-cost-limit) the existing cost limit is kept, and spored terminates the instance when it is reached, even before the new deadline.
--job-array-idstringExtend TTL for all instances in job array by ID
--job-array-namestringExtend TTL for all instances in job array by name
--raise-cost-limitboolRaise the instance's cost limit to what running until the new deadline costs, if it is lower. spored terminates the instance when the cost limit is reached.

spawn footprint โ€‹

Report everything spawn has created in an account โ€” not just instances.

'spawn orphans' covers the DATA plane: volumes, security groups, placement groups, Elastic IPs โ€” the things a launch creates and that a launch's end should reclaim. This covers the CONTROL plane as well: the Lambdas, their log groups and execution roles, EventBridge event buses and the rules on every bus (the default event bus and spawn's own), EventBridge Scheduler schedules (what 'spawn schedule' creates, in every schedule group), state tables, and the buckets spawn auto-creates. The TTL reaper is the backstop for instances; nothing is the backstop for the reaper (#653), so the honest first step is making the footprint visible rather than deleting anything.

This command NEVER deletes. It is a report.

Resources are found two ways, and each row says which:

tag the spawn:managed tag โ€” authoritative, and what 'spawn cleanup' acts on name a spawn/spore/spored/lagotto/truffle name prefix โ€” needed because most of the control plane predates being tagged target a schedule whose target is a spore.host Lambda description a schedule named like spawn's (sched-YYYYMMDD-HHMMSS) whose description is spawn's

Reading schedules needs scheduler:ListSchedules (and scheduler:GetSchedule for the description check). Without them the report says so under "Could not read" and lists everything else.

The name half has a known blind spot, stated rather than hidden: it cannot find a resource named differently. A few known spore.host names with no prefix (such as the 'scheduler-handler' Lambda) are matched by exact name, but any other differently-named resource is missed. So the totals below are a floor, not a guarantee โ€” three separate hand-built footprint lists during #653 were each incomplete.

spawn footprint [flags]

Examples:

sh
# This region, including the control plane
  spawn footprint

  # Every region enabled in this account
  spawn footprint --all-regions

  # Machine-readable
  spawn footprint -o json

Flags:

FlagShortTypeDefaultDescription
--all-regionsboolScan every region enabled in this account (DescribeRegions), not just the configured one
--regionstringAWS region (default: configured region)

spawn fsx โ€‹

Manage FSx Lustre filesystems: list, show, delete (export via delete --export-first)

spawn fsx

spawn fsx delete โ€‹

Delete an FSx Lustre filesystem, optionally exporting to S3 first

spawn fsx delete <filesystem-id> [flags]

Flags:

FlagShortTypeDefaultDescription
--export-firstboolExport data to S3 before deleting
--yes-yboolSkip confirmation prompt

spawn fsx list โ€‹

List all spawn-managed FSx Lustre filesystems across all regions

spawn fsx list

spawn fsx show โ€‹

Aliases: info

Show detailed information about an FSx Lustre filesystem

spawn fsx show <filesystem-id>

spawn hibernate โ€‹

Hibernate an instance to disk (saves RAM state).

The TTL deadline is absolute: it keeps counting while the instance is stopped, and stopping or starting does not move it. Only 'spawn extend' does.

spawn hibernate [instance-id-or-name] [flags]

Flags:

FlagShortTypeDefaultDescription
--job-array-idstringHibernate all instances in job array by ID
--job-array-namestringHibernate all instances in job array by name

spawn image โ€‹

Create custom AMIs that spawn can launch.

Currently supports importing a Windows 11 ISO into an AMI via AWS EC2 Image Builder's managed import-disk-image workflow (drivers, EC2Launch, SSM agent and Defender are pre-staged automatically). See infra/amis/windows/README.md.

spawn image

spawn image import โ€‹

Convert a Windows 11 ISO into an AMI using EC2 Image Builder's managed import-disk-image workflow, then tag it so 'spawn launch --os windows' can use it.

The ISO must be a SUPPORTED, NON-evaluation Windows 11 Enterprise image (23H2 / 24H2 / 25H2 x64) obtained from the Microsoft 365 admin center. Evaluation, Media-Creation-Tool, and LTSC ISOs are rejected by the service. Bring your own Microsoft license (BYOL).

The command self-provisions the IAM roles and Image Builder infrastructure configuration it needs (idempotent); pass --infra-config-arn only to reuse an existing/custom one. See infra/amis/windows/README.md.

Examples:

Local ISO โ€” staging bucket + infra auto-provisioned, nothing to pre-create: โ€‹

spawn image import --iso ./Win11_25H2_Enterprise.iso
--name win11-25h2 --image-index 3

ISO already in S3 (uppercase .ISO key required by the service): โ€‹

spawn image import --iso s3://my-bucket/Win11_25H2_Enterprise.ISO
--name win11-25h2

spawn image import [flags]

Flags:

FlagShortTypeDefaultDescription
--bucketstringS3 bucket to stage a local ISO in (default: managed spawn-iso-import-<account>-<region>, auto-created)
--execution-rolestringAWSServiceRoleForImageBuilderIAM execution role name or ARN
--image-indexint6411-based edition index in a multi-edition ISO
--infra-config-arnstringImage Builder infrastructure configuration ARN (optional; self-provisioned if omitted)
--instance-typestringm6i.largeBuild instance type (when self-provisioning infra)
--isostringWindows 11 ISO: local path or s3://bucket/key.ISO (required)
--keep-isoboolKeep the staged ISO (and managed bucket) after the AMI is built; by default they are deleted (only applies with --wait)
--namestringImage Builder image resource name (required)
--no-secure-bootboolDisable Secure Boot on the output AMI
--no-warmboolSkip building the warm (fast-boot) AMI; produce only the raw imported base AMI
--regionstringus-east-1AWS region for the import build
--s3-keystringS3 object key for the uploaded ISO (default: derived from filename, .ISO)
--security-group-idsstringSliceSecurity groups for the build instance (comma-separated or repeated; when self-provisioning infra)
--subnet-idstringSubnet for the build instance (when self-provisioning infra)
--versionstring1.0.0Semantic version for the output image (major.minor.patch)
--wait-timeoutint60Max minutes to wait when --wait is set before detaching (the build keeps running)
--waitboolWait for the AMI to finish building, then tag and clean up (warm mode implies this)
--warm-instance-typestringm7i.xlargeInstance type for the warm-build seed (non-burstable; Windows)
--warm-timeoutint30Safety-net minutes to wait for the warm seed's first boot (Administrator password) before giving up

spawn image status โ€‹

Report the current state of an EC2 Image Builder image build started by 'spawn image import' (without --wait). Prints PENDING/BUILDING/.../AVAILABLE/FAILED and, once available, the output AMI id.

Example: spawn image status arn:aws:imagebuilder:us-east-1:123456789012:image/win11-25h2/1.0.0/1

spawn image status <image-build-version-arn> [flags]

Flags:

FlagShortTypeDefaultDescription
--regionstringus-east-1AWS region of the image build

spawn image verify โ€‹

Inspect a local Windows installation ISO and report which editions it contains and whether 'spawn image import' (EC2 Image Builder import-disk-image) will accept it โ€” before you spend a real, paid build.

import-disk-image accepts only Windows 11 Enterprise (23H2/24H2/25H2, x64), non-Evaluation. This reads the ISO's install.wim metadata directly (no mount, no external tools) and prints each edition with its image index, flags the one to use, and gives a clear ACCEPTED/REJECTED verdict.

Examples: spawn image verify "/Volumes/External HD/Win11_Enterprise_25H2.iso" spawn image verify win11.iso -o json

spawn image verify <path-to.iso>

spawn instance-config โ€‹

Aliases: config

Read or write runtime config on a running instance via SSH

spawn instance-config <instance-id> <action> [key] [value]

spawn launch โ€‹

Aliases: , run, create

Launch an EC2 instance with smart defaults.

Three ways to use:

  1. Interactive wizard (default if no input)
  2. From truffle JSON via pipe
  3. Direct with flags

Examples:

Interactive wizard โ€‹

spawn launch

From truffle โ€‹

truffle find m7i.large | spawn launch

Direct โ€‹

spawn launch --instance-type m7i.large --region us-east-1

spawn launch <name> [flags]

Flags:

FlagShortTypeDefaultDescription
--active-portsstringTCP ports whose established connections are counted and reported (the spawn:logged-in-count tag). They do NOT prevent the idle stop: an abandoned browser tab holds a connection open forever. To keep a busy app alive, use --active-processes (e.g. '8787' for RStudio, '8787,8888' for RStudio+Jupyter)
--active-processesstringProcess names to monitor, prevents the idle stop while any are running (e.g. 'rsession' for RStudio, 'rsession,jupyter' for multiple)
--allow-cidrstringCIDR allowed to reach the managed Windows security group (RDP 3389 + SSH 22); default 0.0.0.0/0
--allow-cost-limit-overrunboolProceed even when the storage this launch creates exceeds --cost-limit on its own. You are committing to a bill the cap cannot bound.
--allow-missing-endpointsboolWith --no-public-ip: launch even when the subnet lacks a VPC endpoint or NAT route it needs. What is missing is still listed; without it the bootstrap may not install spored, spored may not enforce --ttl or --cost-limit, and spawn connect may not reach the instance
--amistringAMI ID (ami-...); omit or use 'auto' to auto-detect the latest AL2023
--attach-volumestringArrayAttach an EBS volume from a snapshot, mounted at a path: snap-xxx:/mount/point[:ro]. Repeatable. Read-only is the common case for shared reference data.
--auto-placement-groupbooltrueAutomatically create placement group for MPI job arrays (default: true)
--azstringAvailability zone. Pins the launch there; without it (and without --subnet-id), a single launch that hits a capacity error (InsufficientInstanceCapacity) tries the other zones that offer the instance type
--batch-queuestringBatch job queue file (JSON) for sequential execution
--bootstrap-egressstringnoneWith --no-public-ip: how the bootstrap reaches the few hosts outside AWS it fetches from (the EFA installer, and the AWS CLI on an image with none, such as stock Ubuntu) when the subnet has no NAT route. none (default): it does not, and such a launch is refused, naming what it needs. proxy: through a spawn egress proxy in the VPC, a t4g.micro in a public subnet that spawn finds or creates, which forwards only to spawn's own bootstrap hosts; members get its client security group, and their own groups must allow outbound tcp 3128 to it. Only spawn's own fetches use it (the EFA installer and the packages it installs, spawn's apt-get, the AWS CLI download); --command and --mpi-command never see it. The VPC needs a public subnet routed to an internet gateway. Also set by SPAWN_BOOTSTRAP_EGRESS, or once with spawn defaults set bootstrap-egress proxy. On a parameter sweep: the sweep finds or creates the proxy of each member's VPC before any member launches; a detached sweep does so at --detach, and the sweep orchestrator replaces a proxy that has gone before it launches a member (#1515)
--budgetfloat64Budget limit in dollars for parameter sweeps (0 = no limit)
--capacity-blockboolThe --reservation-id is a Capacity Block for ML (sets MarketType=capacity-block); mutually exclusive with --spot (#216)
--commandstringCommand to run on all instances. Runs on the BARE instance as the login user, not root (use sudo) โ€” Docker and fuse are NOT installed, unlike 'spawn task run'. Its exit code is recorded to /tmp/SPAWN_EXITCODE and signals completion, so --on-complete fires when the command exits, pass or fail. Background jobs it leaves running are not waited for: completion is the command's own exit, after at most a 10 s drain of the output they hold, and they are killed when the instance terminates; 'wait' for any you need (#1459). The instance can only reach spawn's own S3 buckets unless you pass --s3-read/--s3-write, --iam-policy or --iam-policy-file. RUNS UNDER 'set -e': the shell has errexit enabled before your script starts, and 'set -uo pipefail' does NOT clear it โ€” so '... | head -n N' (SIGPIPE, rc 141) and 'wait $pid' on a failed job will end the run at that line instead of reporting. Start your script with 'set +e' to take over error handling. The effective options are printed to /var/log/spawn-command.log at start (#707).
--completion-delaystring30sGrace period after completion signal
--completion-filestring/tmp/SPAWN_COMPLETEFile to watch for completion signal
--completion-webhook-urlstringOn workload completion (--completion-file detected), spored POSTs a fire-once, best-effort notice to this URL (spawn#497) โ€” lets a caller wait on its own webhook/queue instead of polling an artifact against a pre-guessed deadline; empty = disabled
--compliance-strictboolStrict mode: fail on warnings (default: show warnings only)
--configstringLaunch config YAML file (supports plugins: list)
--cost-limitfloat64Total spend ceiling in USD, covering compute AND storage (0 = disabled). spored terminates the instance when compute + EBS + public IPv4 reaches it, counting a Spot instance's compute at the Spot price it samples (or, if it cannot read that price, at the on-demand rate, and says so); a launch whose storage alone exceeds it is refused up front, because storage outlives the instance and spored cannot reclaim it against the cap.
--countint1Number of instances to launch (job array)
--detachboolRun sweep orchestration in Lambda (the default for parameter sweeps; without --max-concurrent, min(rows, 10) at a time)
--dns-api-endpointstringLambda Function URL of a custom DNS updater (https://<id>.lambda-url.<region>.on.aws/). Also SPAWN_DNS_API_ENDPOINT, dns.api_endpoint in ~/.spawn/config.yaml, or SSM /spawn/dns/api_endpoint
--dns-domainstringRegister DNS under this zone instead of spore.host (needs an updater serving it; see docs/custom-dns.md). Also SPAWN_DNS_DOMAIN, dns.domain in ~/.spawn/config.yaml, or SSM /spawn/dns/domain
--dns-function-arnstringARN of the Lambda function behind --dns-api-endpoint; the instance role is granted lambda:InvokeFunctionUrl on it (required with a custom endpoint). Also SPAWN_DNS_FUNCTION_ARN, dns.function_arn in ~/.spawn/config.yaml, or SSM /spawn/dns/function_arn
--dnsstringOverride DNS name if different from --name (advanced)
--dry-runboolResolve and print the launch configuration without launching anything (no AWS mutation)
--efa-groupstringWith --efa: create or join the security group spawn-efa-NAME, which admits all traffic between its members, so separate launches (different instance types, no --mpi) can share one EFA fabric. Launch them in one AZ. Unused groups are deleted by the reaper
--efa-interfacesintWith --efa: number of EFA interfaces, one per network card (0 = every EFA the instance type supports; 1 = a single interface). More than one gets its public IP from an Elastic IP, released on terminate
--efa-secondary-typestringefa-onlyWith --efa on a multi-card type (more than one EFA interface): the interface type on each network card after card 0. efa-only (default) is the EFA device alone, with no IP, so all IP traffic uses card 0. efa is EFA with ENA: each card also gets a private IP in the launch subnet, so IP traffic (S3, say) can use that card's bandwidth. Only the primary interface gets the public or Elastic IP. The OS must route the extra interfaces: Ubuntu's cloud-init and Amazon Linux's amazon-ec2-net-utils set up per-interface policy routing at boot; spawn adds none. Refused without multi-card EFA
--efaboolEnable Elastic Fabric Adapter for ultra-low latency MPI (requires supported instance types)
--efs-idstringEFS filesystem ID to mount (fs-xxx)
--efs-mount-optionsstringCustom EFS mount options (overrides profile)
--efs-mount-pointstring/efsEFS mount point (default: /efs)
--efs-profilestringgeneralEFS performance profile: general, max-io, max-throughput, burst
--egress-proxy-idleduration72h0m0sWith --bootstrap-egress proxy: how long a proxy this launch creates may go with nothing proxied before it is retired. At most the proxy's life of 144h0m0s (the TTL reaper's ceiling less a day), which ends it regardless
--estimate-onlyboolShow cost estimate and exit without launching
--fsx-createboolCreate new FSx Lustre filesystem with S3 backing (requires --fsx-lifecycle)
--fsx-export-pathstringS3 path to export to (e.g., s3://bucket/prefix)
--fsx-idstringExisting FSx Lustre filesystem ID to mount (fs-xxx)
--fsx-import-pathstringS3 path to import from (e.g., s3://bucket/prefix)
--fsx-lifecyclestringFSx lifetime (REQUIRED with --fsx-create): 'ephemeral' (reclaimed asynchronously once the instance is gone โ€” by the out-of-band reaper, not by 'spawn terminate') or 'durable' (persists; requires --fsx-ttl)
--fsx-mount-pointstring/fsxFSx mount point (default: /fsx)
--fsx-recallstringRecall FSx filesystem by stack name (recreate from S3)
--fsx-s3-bucketstringS3 bucket for FSx import/export (required with --fsx-create)
--fsx-skip-validateboolSkip FSx filesystem validation (for testing)
--fsx-storage-capacityint321200FSx storage capacity in GB (1200, 2400, or increments of 2400)
--fsx-throughputint32125FSx PERSISTENT_2 throughput in MB/s/TiB (125, 250, 500, or 1000; default: 125)
--fsx-ttlstringFSx time-to-live, required for --fsx-lifecycle=durable (e.g. 7d, 720h) โ€” the filesystem is reaped this long after creation once no instance is using it
--hibernateboolConfigure the instance for hibernation (encrypted root sized for RAM). Implied by --on-idle hibernate and --on-complete hibernate
--iam-allow-full-accessboolPermit wildcard :FullAccess --iam-policy templates (s3:/dynamodb:/sqs: on all resources) on the instance role; off by default โ€” prefer scoped ReadOnly/WriteOnly
--iam-managed-policiesstringSliceAWS managed policy ARNs
--iam-policy-filestringCustom IAM policy JSON file
--iam-policystringSliceService-level policies (e.g., s3:ReadOnly,dynamodb:WriteOnly). Wildcard *:FullAccess templates require --iam-allow-full-access
--iam-role-tagsstringSliceTags for IAM role (key=value format)
--iam-rolestringIAM role name (creates if doesn't exist)
--iam-trust-servicesstringSlice[ec2]Services that can assume role
--idle-cpu-thresholdstringCPU percentage below which spored counts the instance as idle (above 0, at most 100; default 5). Stored in the launch's config object, not a tag
--idle-timeoutstringStop the instance after this much idleness (see --on-idle), e.g. 30m, 2h, 1d (defaults to 1h if neither --ttl nor --idle-timeout set)
--instance-namesstringInstance name template (e.g., 'worker-{index}', default: '{job-array-name}-{index}')
--instance-profilestringAttach this EXISTING IAM instance profile by name, bypassing all --iam-role/--iam-policy/--iam-policy-file resolution and the spored-instance-profile default entirely. Use when you need a deterministic, auditable choice instead of spawn's create/reuse heuristic (#550) โ€” e.g. a profile you've already scoped to a specific data bucket. A --nested-spawn role (spawn-instance-nested-*) named here requires --ttl, as --nested-spawn does.
--instance-typestringInstance type
--interactiveboolForce interactive wizard
--job-array-namestringJob array group name (required if --count > 1)
--keep-on-errorboolIf the launch fails after the instance was created (spored never came up, it never reached running, ...), keep the instance instead of terminating it. For a job array or sweep, keep every member when the launch fails part way, and keep a member whose spored never came up. A kept instance has no TTL/idle/cost-limit enforcement until spored is confirmed running
--key-namestringSSH key pair name (EC2 KeyName)
--launch-delaystring0sDelay between instance launches (e.g., 5s)
--max-concurrent-autoboolDerive --max-concurrent from the account's real AWS quota headroom for the sweep's instance type(s)/region, instead of a user-supplied number (spawn#492)
--max-concurrent-per-regionintMax instances running simultaneously per region (0 = unlimited)
--max-concurrentintMax instances running simultaneously. 0 (the default): a detached sweep runs min(rows, 10) at a time, a --no-detach sweep all at once
--metrics-bindstringWith --metrics: the address to listen on, an IP address or localhost (default localhost; 0.0.0.0 for a scraper on another host)
--metrics-pathstringWith --metrics: the HTTP path to serve metrics on (default /metrics)
--metrics-portintWith --metrics: the metrics server's port, 1024-65535 (default 9090)
--metricsboolStart spored's Prometheus metrics server and tag the instance spawn:metrics-enabled=true, which deployment/prometheus's EC2 discovery matches. It listens on localhost unless --metrics-bind is set, and the security group must admit the scraper (see docs/self-hosted-monitoring.md)
--min-viableint1Job array: minimum members that must launch for success (default 1; ignored for --mpi)
--modestringbalancedDistribution mode: balanced (fair share) or opportunistic (prioritize available regions)
--mpi-commandstringCommand to run via mpirun across the MPI cohort (alternative to --command). Rank 0 runs mpirun as root. Its output goes to /var/log/spawn-command.log on rank 0 (read it with 'spawn array logs <name> --index 0'), and its exit code is recorded to /tmp/SPAWN_EXITCODE there. When it exits, pass or fail, every member is signalled, so --on-complete fires across the whole cohort. Background jobs a rank leaves running are not waited for: a rank ends at its command's own exit, after at most a 10 s drain of the output they hold, and they are killed when the instance terminates; 'wait' for any you need (#1479).
--mpi-processes-per-nodeintMPI processes per node (default: vCPU count)
--mpiboolEnable MPI cluster setup (requires --count > 1)
--namestringName your spore (sets Name tag, DNS, and hostname). Either this or the positional form 'spawn launch <name>'; both are accepted (#499).
--nested-spawnboolGive the instance an IAM role that lets a spawn CLI running on it launch, list, connect to, extend and terminate its own child instances (e.g. a workflow head node). Opt-in: the default spored-instance-role never gets these grants. Children are tagged spawn:managed=true and get their own TTL and spored; a nested spore cannot create IAM roles, so children use the default profile, an existing --instance-profile, or --nested-spawn. Requires --ttl.
--nested-virtualizationboolEnable nested virtualization (run KVM/Hyper-V inside the instance). Requires a C8i/M8i/R8i instance type.
--nist-800-171boolEnable NIST 800-171 Rev 3 compliance mode
--nist-800-53stringEnable NIST 800-53 compliance (low, moderate, high)
--no-detachboolDisable auto-detach for parameter sweeps (requires --ttl or --idle-timeout)
--no-dnsboolDo not register DNS for this instance (by default spored registers the --name/--dns name). Overrides dns.enabled in ~/.spawn/config.yaml for this launch (#549)
--no-public-ipboolLaunch with private IPs only: no public IP on any interface, and no Elastic IP for a multi-card --efa launch, so the region's Elastic IP quota does not limit the fleet. Needs --subnet-id, or --az to let spawn pick a subnet. Before anything is created spawn checks that the subnet can reach what spored and the SSM agent need: a 0.0.0.0/0 route to a NAT gateway or to a working NAT instance (running, source/destination check off, a public IPv4 address, in a subnet routed to an internet gateway), or VPC endpoints for s3 (gateway), ec2, ssm, ssmmessages and ec2messages (interface, private DNS enabled), and refuses the launch if not. On an image other than Amazon's Amazon Linux or a spawn create-ami image built from it (stock Ubuntu, say), which may have no aws CLI, the bootstrap also downloads it from awscli.amazonaws.com, so without a NAT route that launch needs --bootstrap-egress proxy. A sweep checks each member's subnet, a detached one at --detach. spawn connect uses SSM. Refused with --dns and --wait-for-ssh; the DNS record --name implies is skipped
--no-timeoutboolDisable automatic timeout (NOT RECOMMENDED: creates zombie risk)
--notify-platformstringExperimental, needs SPAWN_EXPERIMENTAL_CHAT=1: chat platform for lifecycle notifications: slack (default), teams, or discord
--on-completestringAction when workload signals completion: terminate, stop, hibernate. Use 'terminate' for batch/headless workloads โ€” 'stop' leaves EBS (and any attached EIP) billing indefinitely, which is easy to forget in accounts without a hosted reaper
--on-idlestringAction when the instance goes idle: stop (default) or hibernate. Mirrors --on-complete. NOTE: a stopped/hibernated instance keeps billing for its EBS volumes (and any attached Elastic IP) โ€” for batch/headless work prefer --on-complete terminate so cost is fully bounded
--osstringTarget OS: windows or linux. Omit to auto-detect from the AMI. Use to force the OS for a custom AMI whose platform metadata is unset.
--output-idstringWrite sweep/instance ID to file for scripting
--param-filestringPath to parameter sweep file (JSON/YAML/CSV). Not with --params
--paramsstringInline JSON sweep parameters, in the schema of a JSON param file (defaults, params and/or grid), e.g. '{"defaults":{"instance_type":"t4g.small"},"params":[{"lr":0.1},{"lr":0.01}]}'. Not a path: for a file, use --param-file. Not with --param-file
--placement-groupstringAWS Placement Group for MPI instances (auto-created if not specified)
--pluginstringArrayPlugin to install at launch (ref[@version], repeatable)
--pre-stop-timeoutstringMax time to wait for --pre-stop command (default: 5m, spot: 90s; on spot never past the interruption)
--pre-stopstringShell command to run on the instance before any lifecycle-triggered stop/terminate (e.g., "aws s3 sync /results s3://bucket/")
--print-configboolAlias for --dry-run
--queue-templatestringQueue template name (use 'spawn queue template list' to see options)
--quietboolMinimal output
--regionstringAWS region. Precedence: this flag > SPORE_REGION/AWS_REGION > your spore config > auto-detect (auto-detect picks the lowest-latency region that actually offers the instance type)
--regions-excludestringSliceExclude these regions (supports wildcards: us-, eu-)
--regions-geographicstringSliceGeographic constraints: us, eu, ap, north-america, europe, asia-pacific
--regions-includestringSliceOnly use these regions (supports wildcards: us-, eu-)
--reservation-idstringCapacity Reservation / Capacity Block ID to launch into (fs-/cr-...) โ€” instance must be in the reservation's AZ (#216)
--s3-readstringArrayGrant the instance read access to this S3 bucket (repeatable). A launch instance can otherwise only reach spawn's own buckets, so a --command that reads your bucket gets a 403. Scoped to exactly the named buckets โ€” unlike --iam-policy s3:ReadOnly, which grants read on every bucket in the account.
--s3-writestringArrayGrant the instance write access to this S3 bucket (repeatable). Pair with --s3-read when the workload both reads inputs and writes results.
--security-group-idsstringSliceSecurity group IDs (comma-separated or repeated)
--session-timeoutstring30mAuto-logout idle shells (0 to disable)
--skip-mpi-installboolSkip MPI installation (use with custom AMIs that have MPI pre-installed)
--skip-region-checkboolSkip data locality region mismatch warnings
--slack-workspacestringExperimental, needs SPAWN_EXPERIMENTAL_CHAT=1: Slack workspace ID for lifecycle notifications via spore-bot (e.g. T03NE3GTY)
--spot-max-pricestringMax Spot price
--spot-webhook-urlstringOn spot interruption, spored POSTs a fire-once, best-effort notice to this URL within the ~2-min window (off-node consumers; empty = disabled)
--spotboolLaunch as Spot instance. With a stop-based lifecycle (--idle-timeout, --on-complete stop|hibernate, --hibernate) the request is persistent so EC2 can stop it; otherwise one-time
--strata-formationstringStrata formation to activate (e.g. r-research@2024.03)
--strata-profilestringPath to a Strata profile YAML file
--strata-registrystrings3://strata-registryStrata registry S3 URL
--subnet-idstringSubnet ID
--sweep-namestringHuman-readable sweep identifier (auto-generated if empty)
--tagstringArrayCustom tag key=value on the instance and its created volumes (repeatable). The spawn: prefix is reserved.
--teamstringTeam ID: tag instance with spawn:team-id for team-shared access
--template-varstringToStringTemplate variables (key=value)
--tracing-exporterstringWith --tracing: where spans go. Only stdout (the default) is available; xray is refused, because the instance role spawn creates does not grant xray:PutTraceSegments
--tracing-samplingstringWith --tracing: the fraction of traces kept, 0 to 1 (default 0.1)
--tracingboolTurn on spored's OpenTelemetry tracing. Spans go to spored's journal (the stdout exporter)
--ttlstringAuto-terminate after duration (e.g., 8h, 90m, 1d, 2d12h; defaults to 1h idle if not set)
--user-data-filestringUser data file
--user-datastringUser data (@file or inline)
--volume-sizeint32Root EBS volume size in GiB (0 = use AMI default)
--vpcstringVPC ID
--wait-for-runningbooltrueWait until running
--wait-for-sshboolLinux: also wait (up to 2 min) for SSH on port 22; refused at once if no attached security group allows tcp/22. Off by default: spawn connect uses SSM, and spored is verified either way. --wait-for-ssh=false, given explicitly, skips the spored check too (Windows: skips the password wait)
--wait-timeoutstringTimeout for --wait (e.g., 2h, 30m, 0=no timeout)
--waitboolWait for a detached parameter sweep to complete (not with --no-detach)
--webhook-correlationstringOpaque blob echoed verbatim in the spot-webhook/completion-webhook payload so a consumer can correlate the event to its own record (never parsed by spawn)
--webhook-timeoutstringHard cap on the spot-webhook/completion-webhook POST so it can't eat the reclamation window or delay the completion action (default: 2s)
--yes-yboolSkip confirmation prompts: the launch summary and maximum-cost question on an interactive terminal, the cross-region data-locality warning, and launching without a TTL. Non-interactive runs never ask, but always print the maximum cost

spawn list โ€‹

Aliases: ls

List spawn-managed EC2 instances across regions.

Shows all instances with the spawn:managed tag.

Examples:

List all instances โ€‹

spawn list

Filter by region โ€‹

spawn list --region us-east-1

Filter by state โ€‹

spawn list --state running

JSON output โ€‹

spawn list --output json

spawn list [flags]

Flags:

FlagShortTypeDefaultDescription
--azstringFilter by availability zone
--instance-familystringFilter by instance family (e.g., m7i, t3)
--instance-typestringFilter by exact instance type (e.g., t3.micro)
--job-array-idstringFilter by job array ID
--job-array-namestringFilter by job array name
--regionstringFilter by AWS region (default: all regions)
--regions-rstringSliceFilter by regions (comma-separated, e.g. us-east-1,us-west-2)
--statestringFilter by instance state. Default (or "live"): pending, running, stopping, stopped and shutting-down (everything not yet terminated; shutting-down still bills). "active": the same without shutting-down. Or one EC2 state (running, stopped, ...), or all/any for no filter (includes terminated)
--sweep-idstringFilter by parameter sweep ID
--sweep-namestringFilter by parameter sweep name
--tagstringArrayFilter by tag (key=value format, can be specified multiple times)

spawn logs โ€‹

Fetch a spore's log.

While the instance is alive this tails the log directly, over SSH when a local key resolves and over SSM otherwise โ€” the same path 'spawn array logs' uses.

Once the instance is GONE, that is impossible: the log died with it. spored writes the last 50 lines of a FAILED job's command log to the serial console before terminating (#736), and this reads it back out, so "why did my job fail?" is answerable after the fact without knowing that get-console-output exists.

The serial console capture is not immediate โ€” allow about five minutes after termination. Fetched dumps are cached under ~/.spawn/cache/console for 7 days and pruned on each run. Once EC2 has stopped listing the instance, the cache is still found by name or instance ID.

spawn logs <name-or-instance-id> [flags]

Flags:

FlagShortTypeDefaultDescription
--consoleboolPrint the whole serial console dump, not just the command-log block
--linesint100Lines to tail from a LIVE instance (the console block is fixed at what spored wrote)
--no-cacheboolIgnore the local cache and re-fetch from AWS
--whichstringcommandWhich log: command or spored

spawn notify โ€‹

Aliases: bot

EXPERIMENTAL: chat-platform notifications are not supported in this release. Every command here requires SPAWN_EXPERIMENTAL_CHAT=1 (or experimental.chat: true in ~/.spawn/config.yaml) and otherwise refuses.

Register and manage Slack/Teams/SMS notifications for instances.

Lets authorized users receive lifecycle events (launch, idle stop, TTL warn, termination) and control instances via chat slash commands without CLI access.

Examples: spawn notify register --platform slack --user professor@example.com
--instance i-0abc123 --nickname rstudio --allow start,stop,status spawn notify deregister --platform slack --user-id U04KZABCD --nickname rstudio spawn notify list --platform slack --workspace-id T03NE3GTY

spawn notify

spawn notify deregister โ€‹

Remove a chat bot registration

spawn notify deregister [flags]

Flags:

FlagShortTypeDefaultDescription
--nicknamestringNickname to deregister
--platformstringChat platform: slack, teams, or discord
--tablestringOverride DynamoDB registry table name
--user-idstringPlatform user ID
--workspace-idstringPlatform workspace ID

spawn notify disable โ€‹

Suspend bot access without removing the registration. Use during sensitive computation runs or maintenance. Re-enable with 'spawn notify enable'.

spawn notify disable [flags]

Flags:

FlagShortTypeDefaultDescription
--nicknamestringNickname of the registration to enable/disable
--platformstringChat platform: slack, teams, or discord
--tablestringOverride DynamoDB registry table name
--user-idstringPlatform user ID
--workspace-idstringPlatform workspace ID

spawn notify enable โ€‹

Grant bot access to a registered instance. Registrations are created disabled by default โ€” this command must be run before a chat user can control the instance via slash commands.

spawn notify enable [flags]

Flags:

FlagShortTypeDefaultDescription
--nicknamestringNickname of the registration to enable/disable
--platformstringChat platform: slack, teams, or discord
--tablestringOverride DynamoDB registry table name
--user-idstringPlatform user ID
--workspace-idstringPlatform workspace ID

spawn notify list โ€‹

List chat bot registrations for a workspace

spawn notify list [flags]

Flags:

FlagShortTypeDefaultDescription
--platformstringChat platform: slack, teams, or discord
--tablestringOverride DynamoDB registry table name
--workspace-idstringPlatform workspace ID

spawn notify register โ€‹

Register an EC2 instance so a chat user can control it via slash commands.

Supports specifying the user by email (--user) which resolves to a platform user ID, or directly by platform ID (--user-id + --workspace-id).

The --nickname is the friendly name used in slash commands, e.g.: /prism stop rstudio /prism status jupyter

Both the instance ID and instance name (DNS name or spawn:name tag) are accepted as the target in slash commands once registered.

Without --role-arn, spawn creates the SpawnBotCrossAccount role in your account, trusting your self-hosted spore-bot's execution role, which SPORE_BOT_LAMBDA_ROLE_ARN must name (spore.host no longer hosts a bot, so there is no default), under a per-account ExternalId, and stores that ExternalId in the registration. If the role exists but trusts a different principal, or has no per-account ExternalId, register stops and says so; --repair rewrites the trust policy of a role spawn created (for example one that still trusts spore.host's retired hosted bot). A role spawn did not create is never modified.

With --role-arn (for example the bot-cross-account-role.yaml stack's RoleArn output), pass the ExternalId in that role's trust policy with --external-id.

spawn notify register [flags]

Flags:

FlagShortTypeDefaultDescription
--allowstringSliceAllowed actions (default: start,stop,status,hibernate,url)
--connect-codestringOne-time code from /spore connect (alternative to --user-id)
--external-idstringSTS ExternalId in --role-arn's trust policy (the auto-created role supplies its own)
--instancestringInstance ID (i-...) or name
--nicknamestringFriendly name for slash commands (default: 'default')
--platformstringChat platform: slack, teams, or discord
--repairboolRewrite the trust policy of a spawn-created SpawnBotCrossAccount role that trusts an old bot principal or lacks a per-account ExternalId
--role-arnstringCross-account IAM role ARN for this instance's account (created automatically if omitted)
--tablestringOverride DynamoDB registry table name
--tag-prefixstringTag prefix: spawn or prism (default: auto-detected)
--user-idstringPlatform-native user ID (e.g. Slack U04KZABCD)
--userstringUser email address (resolved to platform user ID)
--workspace-idstringPlatform workspace ID (e.g. Slack T03NE3GTY)

spawn notify workspace โ€‹

Manage chat-platform workspace registrations

spawn notify workspace

spawn notify workspace add โ€‹

Store a workspace's bot credentials so the spore-bot Lambda can verify incoming requests and reply to them. Credentials are stored encrypted.

What each platform needs:

slack --bot-token and --signing-secret (the Slack app's signing secret) teams --bot-token (the Azure Bot client secret). No --signing-secret: spore-bot verifies Teams requests with Bot Framework tokens, and refuses a Teams workspace that carries one. Never pass the bot's App ID; it is public. discord --public-key (the application's Ed25519 public key)

Run this once after installing the app in a workspace:

spawn notify workspace add
--platform slack
--workspace-id T03NE3GTY
--workspace-name "My Workspace"
--bot-token xoxb-...
--signing-secret abc123...

spawn notify workspace add
--platform teams
--workspace-id <TEAMS_TENANT_ID>
--bot-token <AZURE_BOT_CLIENT_SECRET>

spawn notify workspace add [flags]

Flags:

FlagShortTypeDefaultDescription
--allowed-channelsstringSliceRestrict commands to specific channel IDs (e.g. C12345,C67890). Empty = all channels.
--bot-tokenstringBot token (Slack xoxb-..., Teams Azure Bot client secret, or Discord bot token)
--connect-ttlintMax /spore connect code lifetime in hours (0 = use platform default, typically 24h). Can only lower the platform default.
--platformstringChat platform: slack, teams, or discord
--public-keystringDiscord application public key (Ed25519, hex; required for discord)
--signing-secretstringSlack app signing secret (required for slack; refused for teams)
--tablestringOverride DynamoDB workspaces table name
--webhook-urlstringChannel webhook URL for notifications (Discord channel webhook, or manual Slack incoming webhook)
--workspace-idstringPlatform workspace ID
--workspace-namestringHuman-friendly workspace name

spawn notify workspace destroy โ€‹

Permanently delete all instance registrations across all users in a workspace, and remove the workspace's bot token and signing secret.

Preview with --dry-run; otherwise it prompts for confirmation (skip with --yes) and then executes the full teardown.

Note: The SpawnBotCrossAccount IAM role in customer accounts is not deleted automatically. Remove it separately with: aws cloudformation delete-stack --stack-name spawn-bot-cross-account

spawn notify workspace destroy [flags]

Flags:

FlagShortTypeDefaultDescription
--dry-runboolPreview what would be removed without deleting anything
--platformstringChat platform: slack, teams, or discord
--registry-tablestringOverride DynamoDB registry table name
--workspace-idstringPlatform workspace ID (required)
--workspaces-tablestringOverride DynamoDB workspaces table name
--yes-yboolSkip the confirmation prompt

spawn notify workspace list โ€‹

List registered workspaces

spawn notify workspace list [flags]

Flags:

FlagShortTypeDefaultDescription
--platformstringChat platform: slack, teams, or discord
--tablestringOverride DynamoDB workspaces table name

spawn notify workspace remove โ€‹

Remove a workspace registration

spawn notify workspace remove [flags]

Flags:

FlagShortTypeDefaultDescription
--platformstringChat platform: slack, teams, or discord
--tablestringOverride DynamoDB workspaces table name
--workspace-idstringPlatform workspace ID
--yes-yboolSkip the confirmation prompt

spawn onboard โ€‹

Create the cross-account role the spore.host portal uses to launch and manage EC2 in this account, and register it with the portal.

Run with credentials for the account you want to onboard (SSO, profile, or keys). This is the CLI equivalent of the web CloudFormation quick-create.

Re-running is safe: an existing role keeps the ExternalId it already trusts (pass --external-id to change it), and its trust and inline policies are rewritten to the current documents. With -o json, stdout carries only the JSON result; progress goes to stderr.

spawn onboard [flags]

Flags:

FlagShortTypeDefaultDescription
--external-idstringExternalId the role must trust (default: the existing role's, else a new one)
--phone-home-rolestringPortal phone-home Lambda role ARN to trust (or SPORE_PORTAL_PHONE_HOME_ROLE_ARN)
--phone-home-urlstringPortal phone-home Function URL (or SPORE_PORTAL_PHONE_HOME_URL)
--regionstringAWS region to onboard (default: profile/SDK region)
--skip-phone-homeboolCreate the role but don't auto-register with the portal
--spored-rolestringRole name to allow iam:PassRole for (default spored-instance-role)

spawn orphans โ€‹

Report spawn-managed resources that appear orphaned โ€” present but with no running instance using them:

  • EBS volumes in the 'available' state
  • security groups not attached to any instance
  • cluster placement groups with no instances left in them
  • the shared infrastructure (key pair, IAM role) when no instances remain
  • Elastic IPs that are unassociated, or attached to a stopped instance (an EIP keeps billing even while the instance is stopped)

This is a read-only report. 'spawn cleanup' removes orphaned EBS volumes, security groups, placement groups, key pairs, and IAM roles. Elastic IPs are reported but never released by spawn โ€” spawn never allocates them. Before releasing an EIP with 'aws ec2 release-address', verify ownership using the tags column in the report (or 'aws ec2 describe-addresses'), as that operation is irreversible.

spawn orphans [flags]

Flags:

FlagShortTypeDefaultDescription
--all-regionsboolSearch every enabled region
--allboolInclude resources created by other principals (default: only yours)
--regionstringAWS region (default: current region from AWS config)

spawn pipeline โ€‹

Manage multi-stage pipelines with DAG dependencies.

Pipelines allow you to orchestrate complex workflows where each stage runs on separate instances with different instance types. Stages can depend on each other, forming a directed acyclic graph (DAG).

Data can be passed between stages via:

  • S3 (batch mode): Stage outputs uploaded to S3, downloaded by next stage
  • Network streaming (real-time): Direct TCP/gRPC connections between stages
spawn pipeline

spawn pipeline cancel โ€‹

Cancel a running pipeline and terminate all instances.

Sets the cancellation flag in DynamoDB. The orchestrator Lambda will terminate all running instances and mark the pipeline as CANCELLED.

spawn pipeline cancel <pipeline-id> [flags]

Flags:

FlagShortTypeDefaultDescription
--yes-yboolSkip the confirmation prompt

spawn pipeline collect โ€‹

Download the stage outputs of a pipeline run.

Downloads every stage's data_output files from the pipeline's s3_bucket, under <s3_prefix>/runs/<run-id>/stages/<stage>/output/, to <output-dir>/<stage>/<file>. A stage with instance_count > 1 keeps each instance's files under its index: <output-dir>/<stage>/<index>/<file>. Stage COMPLETE/FAILED markers are not downloaded.

The pipeline's latest run is collected unless --run names another run of the same pipeline id. An object whose key would land outside --output-dir is refused, and nothing is downloaded.

result_s3_bucket and result_s3_prefix are deprecated and ignored: nothing writes there (#989).

spawn pipeline collect <pipeline-id> [flags]

Flags:

FlagShortTypeDefaultDescription
--output-dirstring./resultsOutput directory for downloaded files
--runstringRun id to collect, as printed at launch (default: the pipeline's latest run)
--stagestringDownload results from specific stage only

spawn pipeline graph โ€‹

Display the pipeline dependency graph as ASCII art.

Shows:

  • Stage names and instance types
  • Dependencies between stages
  • Fan-out and fan-in patterns
  • Data passing modes (S3 or streaming)
spawn pipeline graph <file> [flags]

Flags:

FlagShortTypeDefaultDescription
--simpleboolShow simplified graph
--statsboolShow graph statistics

spawn pipeline launch โ€‹

Launch a multi-stage pipeline.

The pipeline definition will be uploaded to S3 and a Lambda orchestrator will be invoked to manage the pipeline execution.

Each launch is a new run with its own run id. A run's stage markers, outputs and config live under <s3_prefix>/runs/<run-id>/, so a run never reads another run's results, even under the same s3_prefix.

pipeline_id comes from the definition file, so launching the same file again reuses it. If that pipeline has a run still in flight, launch refuses rather than replacing the running pipeline's record. --replace cancels the run in flight (its instances are terminated) and then starts the new one.

spawn pipeline launch <file> [flags]

Flags:

FlagShortTypeDefaultDescription
--regionstringAWS region (default: from AWS config)
--replaceboolIf the pipeline has a run in flight, cancel it (terminating its instances) and start a new run
--wait-timeoutduration24h0m0sGive up waiting after this long (the pipeline keeps running; --wait then exits non-zero)
--waitboolBlock until the pipeline reaches a terminal state, and exit non-zero if it did not succeed

spawn pipeline list โ€‹

List all pipelines for the current user.

Shows pipeline ID, name, status, and cost.

spawn pipeline list [flags]

Flags:

FlagShortTypeDefaultDescription
--statusstringFilter by status (INITIALIZING, RUNNING, COMPLETED, FAILED, CANCELLED)

spawn pipeline status โ€‹

Show the current status of a running or completed pipeline.

Displays:

  • Overall pipeline status
  • The current run id, which 'spawn pipeline collect --run' takes, and the pipeline's other runs found in its s3_bucket
  • Per-stage progress
  • Instance information
  • Cost tracking

With --output json, prints the pipeline record with run_id and runs (every run id found in S3, oldest first; null, with runs_error, when they could not be listed).

spawn pipeline status <pipeline-id>

spawn pipeline validate โ€‹

Validate a pipeline definition file.

Checks:

  • JSON syntax and structure
  • Required fields present
  • Stage dependencies valid (no circular dependencies)
  • Instance types, regions, and other configuration valid
spawn pipeline validate <file>

spawn plugin โ€‹

Install, inspect, and remove service plugins on running instances.

Plugins are composable service units (Jupyter, Globus, Tailscale, etc.) defined by YAML specs with install/start/stop/health lifecycles.

Examples: spawn plugin list --instance i-0abc123 spawn plugin install globus-personal-endpoint --instance i-0abc123
--config endpoint_name=my-endpoint spawn plugin status globus-personal-endpoint --instance i-0abc123 spawn plugin remove globus-personal-endpoint --instance i-0abc123

spawn plugin

spawn plugin gen-index โ€‹

Generate index.json for a plugin registry from its plugins/ directory.

This is the generator side of plugin discovery, in the same arrangement as 'spawn plugin manifest': it lives here, and the registry's CI invokes it, so the index is always derived by the same parser that installs plugins and can never describe a spec differently from the spec itself.

--generated-at takes an RFC3339 timestamp (CI passes the commit time) so regenerating an unchanged registry produces a byte-identical file. It defaults to now, which makes every run differ โ€” fine locally, churn in CI.

Examples: spawn plugin gen-index ./plugins -o index.json spawn plugin gen-index ./plugins --generated-at 2026-07-29T00:00:00Z

spawn plugin gen-index <plugins-dir> [flags]

Flags:

FlagShortTypeDefaultDescription
--generated-atstringRFC3339 generation timestamp (default: now)
--output-ostringWrite index to this file instead of stdout
--sourcestringspore-host/spore-pluginsowner/repo the index describes

spawn plugin info โ€‹

Show what the registry knows about a plugin: version, description, config parameters, and declared capability surface.

This reads the registry index and contacts no instance. It describes the plugin as PUBLISHED โ€” for the full spec of what installing would run, including every step, use 'spawn plugin inspect <ref>'.

Examples: spawn plugin info tailscale spawn plugin info jupyterlab --output json

spawn plugin info <name> [flags]

Flags:

FlagShortTypeDefaultDescription
--refreshboolBypass the local cache and refetch the registry index

spawn plugin inspect โ€‹

Resolve a plugin reference and render its plan โ€” resolved source and version, local (controller) vs remote (instance) steps, requested controller environment, root vs login-user execution, downloads, health checks, cleanup, and its declared permissions block โ€” WITHOUT executing anything or contacting an instance.

Installing a plugin runs its author's code on your machine and, on the instance, as root. Inspect it first, especially for third-party (github:) plugins.

Plugin ref formats are the same as 'spawn plugin install': name official registry (spore-host/spore-plugins) name@v1.2.0 pinned to git tag github:user/repo/name custom GitHub repository ./path/to/plugin.yaml local file

spawn plugin inspect <plugin-ref> [flags]

Flags:

FlagShortTypeDefaultDescription
--insecureboolSkip signature/checksum verification for official plugin releases (unsafe)

spawn plugin install โ€‹

Install a plugin on a running spore instance.

Runs the plugin's full lifecycle: local provision steps on this controller (e.g. creating a mutagen sync or a Globus endpoint), then the remote install/configure/start steps on the instance via spored. Values captured and pushed by local steps are delivered before the remote configure phase runs.

spored's push API listens on the instance's loopback only. spawn reaches it over SSH when the instance has a public IP and SSH works, and otherwise runs the request on the instance over SSM (keyless or SSM-only instances, no public IP). The same applies to 'spawn plugin list', 'status' and 'remove'.

Linux spores only: plugin steps are POSIX shell, so 'spawn plugin install' refuses a Windows spore (spawn:os=windows) before running anything.

Plugin ref formats: name official registry (spore-host/spore-plugins) name@v1.2.0 pinned to git tag github:user/repo/name custom GitHub repository ./path/to/plugin.yaml local file

spawn plugin install <plugin-ref> [flags]

Flags:

FlagShortTypeDefaultDescription
--configstringArrayConfig as key=value (repeatable)
--dry-runboolPreview the plan without installing (contacts no instance)
--insecureboolSkip signature/checksum verification for official plugin releases (unsafe)
--instance-istringInstance ID or hostname (required)
--keystringPath to SSH private key
--userstringSSH username for the instance (default: ec2-user)

spawn plugin list โ€‹

List plugins installed on an instance

spawn plugin list [flags]

Flags:

FlagShortTypeDefaultDescription
--instance-istringInstance ID or hostname (required)
--keystringPath to SSH private key
--userstringSSH username for the instance (default: ec2-user)

spawn plugin manifest โ€‹

Generate the checksum manifest (manifest.json) for a plugin directory. The manifest records the sha256 of the plugin's plugin.yaml so that spawn can verify a fetched official plugin matches the released bytes. This is the generator side of the registry supply-chain story: the registry's release workflow runs it and publishes the output as a GitHub Release asset; spawn verifies against it at install time. Contacts nothing.

Examples: spawn plugin manifest ./plugins/tailscale spawn plugin manifest ./plugins/tailscale -o manifest.json

spawn plugin manifest <plugin-dir> [flags]

Flags:

FlagShortTypeDefaultDescription
--output-ostringWrite manifest to this file instead of stdout

spawn plugin remove โ€‹

Remove a plugin from an instance

spawn plugin remove <name> [flags]

Flags:

FlagShortTypeDefaultDescription
--instance-istringInstance ID or hostname (required)
--keystringPath to SSH private key
--userstringSSH username for the instance (default: ec2-user)
--yes-yboolSkip the confirmation prompt

Search the official plugin registry (spore-host/spore-plugins) for plugins available to install. With no query, lists everything.

Reads a generated index published by the registry, cached locally so this works offline; the age of what you're seeing is always shown. This lists what EXISTS โ€” use 'spawn plugin list --instance <id>' for what is installed on an instance.

Examples: spawn plugin search spawn plugin search jupyter spawn plugin search --refresh

spawn plugin search [query] [flags]

Flags:

FlagShortTypeDefaultDescription
--refreshboolBypass the local cache and refetch the registry index

spawn plugin status โ€‹

Show a plugin's status on an instance, and its declared outputs.

Outputs are the values a plugin's local provision steps capture under a name its spec declares in outputs: (for example a Globus endpoint ID). They are recorded on the machine that ran 'spawn plugin install', so they are shown only there. Values a plugin captures without declaring them are never shown: they are often credentials it captures only to push to the instance.

spawn plugin status <name> [flags]

Flags:

FlagShortTypeDefaultDescription
--instance-istringInstance ID or hostname (required)
--keystringPath to SSH private key
--userstringSSH username for the instance (default: ec2-user)

spawn plugin validate โ€‹

Statically validate one or more plugin.yaml files without contacting any instance. Checks schema, semver, known step/condition/config types, that the containing directory matches the plugin name, and that every {{ config.X }} template reference points at a declared config parameter.

With --strict, also enforce that the declared permissions: block is consistent with the plugin's steps (e.g. instance.root=false must have no remote step that runs as root). --strict requires a permissions: block. The official registry's CI runs --strict so a published plugin's declared capability surface is enforced.

Examples: spawn plugin validate ./plugins/tailscale/plugin.yaml spawn plugin validate --strict ./plugins/*/plugin.yaml

spawn plugin validate <path>... [flags]

Flags:

FlagShortTypeDefaultDescription
--strictboolAlso enforce permissions/step consistency (requires a permissions: block)

spawn pool โ€‹

Run a wide fan-out as a POOL of reusable worker instances instead of one ephemeral instance per task.

At high fan-out, one-instance-per-task is dispatch-bound and pays a full instance boot per task, so short tasks self-terminate faster than new ones launch and concurrency can never reach N. A worker pool inverts this: N fungible workers pull tasks from a run-scoped SQS queue and reuse across jobs (per-job cost is stage+run only), degrading gracefully โ€” ask for N workers, get M, and tasks drain through whatever pool came up.

Workers TERMINATE (not stop) once there is nothing left for them to do: when the queue has been empty for --idle-timeout (scale to zero), or at once when 'spawn pool drain' deletes the queue. --ttl and --cost-limit bound each worker regardless, and the reaper is the backstop.

spawn pool

Flags:

FlagShortTypeDefaultDescription
--run-idstringRun id identifying the pool (queue) โ€” shared by all commands

spawn pool create โ€‹

Provision the worker pool + task queue for a run

spawn pool create --run-id R --workers N --instance-type T [flags]

Flags:

FlagShortTypeDefaultDescription
--containerstringArrayContainer image the pool's tasks run (repeatable); a private-ECR image adds an ECR pull grant to the workers' role, as 'spawn task run' does
--cost-limitfloat64Spend ceiling in USD PER WORKER, covering compute and storage (0 = disabled); spored terminates a worker that reaches it, as with 'spawn launch --cost-limit'
--idle-timeoutduration5m0sWorkers terminate after this long with an empty queue
--instance-typestringWorker instance type (e.g. c7i.large)
--min-viableint1Minimum workers that must come up (best-effort: ask N, accept >= this)
--s3-readstringArrayExtra S3 bucket the tasks read inputs from (repeatable) โ€” beyond the results bucket workers always get
--s3-writestringArrayExtra S3 bucket the tasks write outputs to (repeatable) โ€” beyond the results bucket
--spotboolLaunch workers as Spot instances
--ttlstring4hPer-worker TTL backstop
--visibility-timeoutint900SQS claim window in seconds (must exceed the longest task runtime)
--workersintNumber of worker instances to provision

spawn pool drain โ€‹

Delete the pool's task queue; its workers then terminate

spawn pool drain --run-id R [flags]

Flags:

FlagShortTypeDefaultDescription
--waitduration2m0sHow long to wait for the pool's workers to terminate before removing its IAM role (0 = check once)

spawn pool status โ€‹

Show the pool queue depth (visible + in-flight tasks)

spawn pool status --run-id R

spawn pool submit โ€‹

Stage a task spec to S3 and enqueue it for the pool

spawn pool submit --run-id R --spec spec.json [flags]

Flags:

FlagShortTypeDefaultDescription
--specstringPath to a TaskSpec JSON file to enqueue

spawn queue โ€‹

Commands for managing and monitoring batch job queues.

Batch queues execute jobs sequentially on a single instance, with dependency management and automatic result collection.

Examples:

Check queue status on instance โ€‹

spawn queue status i-1234567890abcdef0

Download queue results โ€‹

spawn queue results queue-20260122-140530 --output ./results/

spawn queue

spawn queue results โ€‹

Download all job results from S3 for a completed or running queue.

Results include job outputs, logs, and the final queue state.

Examples:

Download to current directory โ€‹

spawn queue results queue-20260122-140530

Download to specific directory โ€‹

spawn queue results queue-20260122-140530 --output ./my-results/

spawn queue results <queue-id> [flags]

Flags:

FlagShortTypeDefaultDescription
--bucketstringS3 bucket holding the results (overrides --config; default spawn-results-<region>)
--configstringQueue config JSON the queue was launched with; its result_s3_bucket is where results actually went
--output-dirstring.Output directory for results

spawn queue status โ€‹

Show the execution status of a batch queue running on an instance.

Connects to the instance via SSH and reads the queue state file.

Examples: spawn queue status i-1234567890abcdef0

spawn queue status <instance-id>

spawn queue template โ€‹

Manage pre-built queue configuration templates.

Templates provide ready-to-use queue configurations for common workflows with variable substitution for customization.

Available commands: list - List available templates show - Show template details generate - Generate queue config from template

spawn queue template

spawn queue template generate โ€‹

Generate a queue configuration file from a template with variable substitution.

Variables can be provided via --var flags or use template defaults.

Examples:

Generate with defaults, output to file โ€‹

spawn queue template generate ml-pipeline --output pipeline.json

Provide required variables โ€‹

spawn queue template generate ml-pipeline
--var INPUT=/data/train.csv
--var S3_BUCKET=my-results
--output pipeline.json

Output to stdout (for piping) โ€‹

spawn queue template generate simple-sequential
--var S3_BUCKET=results

spawn queue template generate <template-name> [flags]

Flags:

FlagShortTypeDefaultDescription
--output-filestringOutput file (default: stdout)
--varstringToStringTemplate variables (key=value)

spawn queue template init โ€‹

Launch an interactive wizard to create a custom queue configuration.

Guides you through creating a queue by asking questions about:

  • Workflow type and name
  • Number of jobs and commands
  • Job dependencies
  • Timeouts and retry policies
  • Result collection
  • S3 bucket configuration

Examples: spawn queue template init spawn queue template init --output my-queue.json

spawn queue template init [flags]

Flags:

FlagShortTypeDefaultDescription
--output-filestringOutput file (default: queue.json)

spawn queue template list โ€‹

List all available queue configuration templates.

Shows template names, descriptions, and required/optional variables.

Examples: spawn queue template list

spawn queue template list

spawn queue template show โ€‹

Show detailed information about a queue template.

Displays template description, jobs, and all variables with their defaults.

Examples: spawn queue template show ml-pipeline spawn queue template show etl

spawn queue template show <template-name>

spawn reaper โ€‹

Run spawn's TTL reaper inside your own AWS account.

The reaper is the backstop for what spored cannot do. spored enforces TTL, idle and cost from INSIDE each instance โ€” so it cannot act on an instance that is stopped, it cannot delete a filesystem that outlives its instance, and it enforces nothing at all if it dies. "Everything dies eventually" holds in two layers, and this is the second.

spawn's own deployment of the reaper lives in the spore.host infra account and reaches into each launching account by assuming a role there. That requires your account to trust an external principal, which many organizations forbid outright โ€” so for those accounts the reaper was simply unavailable, and nothing reclaimed a stopped instance past its TTL or an orphaned filesystem.

These commands deploy the same reaper in your account, scanning only your account. It assumes nothing and trusts nothing but Lambda.

It deploys UNARMED (dry-run): the schedule runs and logs what it WOULD reclaim, and touches nothing, until you run 'spawn reaper arm'. Read a cycle of those logs first โ€” the reaper terminates instances, and that is not reversible.

spawn doctor # does anything cover this account today? spawn reaper deploy # install it, unarmed spawn reaper status # deployed? armed? on what schedule? covered anyway? spawn reaper arm # start actually reclaiming spawn reaper teardown # remove it

Versioning: the CLI and a deployed reaper are INDEPENDENT. Upgrading spawn does not touch a reaper already in an account, and 'spawn reaper deploy' installs the artifact for whichever version it is asked for. So a deployed reaper can be older than the CLI talking to it โ€” 'spawn reaper status' prints both and says so when they differ. Nothing breaks when they do; an older reaper still reaps. Bring them together by re-running 'spawn reaper deploy' (spawn#654).

spawn reaper

Flags:

FlagShortTypeDefaultDescription
--regionstringAWS region to operate in (default: resolved region)

spawn reaper arm โ€‹

Let the deployed reaper actually terminate expired instances

spawn reaper arm [flags]

Flags:

FlagShortTypeDefaultDescription
--yesboolSkip the confirmation prompt

spawn reaper deploy โ€‹

Create the reaper's execution role, upload its Lambda artifact to a bucket in this account, create its log group with a retention (30 days by default), create the function, and put it on a schedule. A second rule in this region invokes it when EC2 reports an instance terminated, so a launch Elastic IP is released at once rather than on the next sweep; other scanned regions rely on the sweep.

Deploys with dry-run ON. Nothing is reclaimed until 'spawn reaper arm'.

The artifact comes from the spawn GitHub Release matching --version (default: this binary's version). --artifact overrides that with a local path or an explicit URL, for mirrored or air-gapped environments.

Re-running it upgrades an existing reaper in place and keeps its settings: the armed state, the scanned regions and every other REAPER_* variable stay as they are unless a flag here sets them. --spot-requests, --net-resources, --max-age and --notify-url set the matching variable; pass an empty value ("") to remove one and return the reaper to its default. The notify URL is never printed; pass "-" to read it from stdin instead of the command line.

spawn reaper deploy [flags]

Flags:

FlagShortTypeDefaultDescription
--artifactstringUse this Lambda zip instead of downloading a release asset (local path or URL)
--bucketstringS3 bucket in THIS account to hold the artifact (default: spawn-reaper-artifacts-<account>-<region>)
--elastic-ipsstringOrphaned launch Elastic IP sweep, REAPER_ELASTIC_IPS: off|report|reap (default: keep; the reaper's default is reap, or off when REAPER_NET_RESOURCES=off)
--empty-bucketsstringEmpty spawn-staging/spawn-results bucket sweep, REAPER_EMPTY_BUCKETS: off|report|reap (default: keep; the reaper's default is report)
--instance-rolesstringUnused per-task spawn-instance-* IAM role sweep, REAPER_INSTANCE_ROLES: off|report|reap (default: keep; the reaper's default is report)
--launch-configsstringUnreferenced launch config object sweep (spawn-staging-*/launch-config/config-<sha256>.json no instance or Spot request names, a day old), REAPER_LAUNCH_CONFIGS: off|report|reap (default: keep; the reaper's default is report)
--log-retention-daysint32Days CloudWatch keeps the reaper's logs, a value CloudWatch accepts: 1, 3, 5, 7, 14, 30, 60, 90, ... (default: keep the existing reaper's; 30 for a new one). Below 30, 'teardown --if-idle-for' can see at most that much history
--max-agestringMax-age ceiling, REAPER_MAX_AGE, e.g. 336h or 14d (default: keep; the reaper's default is 7d)
--net-resourcesstringNetwork-resource sweep, REAPER_NET_RESOURCES: off|report|reap (default: keep; the reaper's default is report)
--notify-urlstringURL the reaper POSTs notifications to, REAPER_NOTIFY_URL; never printed. "-" reads it from stdin (default: keep)
--pool-queuesstringAbandoned pool SQS queue and staged-spec sweep, REAPER_POOL_QUEUES: off|report|reap (default: keep; the reaper's default is report)
--regionsstringComma-separated regions for the reaper to scan (default: keep the existing reaper's; the deploy region for a new one)
--schedule-paramsstringOrphaned schedule params sweep (spawn-schedules-*/schedules/<id>/params.yaml with no schedule record, 30 days old), REAPER_SCHEDULE_PARAMS: off|report|reap (default: keep; the reaper's default is report)
--schedulestringEventBridge schedule expression (default: keep the existing reaper's; rate(10 minutes) for a new one)
--spot-requestsstringOrphaned Spot-request sweep, REAPER_SPOT_REQUESTS: off|report|reap (default: keep; the reaper's default is report)
--ttl-gracestringHow long past its TTL deadline a running instance whose spored still checks in is left for spored to end itself, REAPER_TTL_GRACE, 0 to 1h (default: keep; the reaper's default is 10m)
--versionstringspawn release to take the reaper artifact from (default: this binary's version)

spawn reaper status โ€‹

Report whether the reaper is deployed here, and whether it is armed

spawn reaper status

spawn reaper teardown โ€‹

Remove the reaper from this account: the schedule, the terminated-instance rule, the Lambda, its role, its CloudWatch log group, and the S3 bucket holding its artifact. --keep-logs leaves the log group, which is the only record of what the reaper did.

The bucket used to be left behind deliberately (#653). Under "leave no trace" that is wrong โ€” an idle reaper that tidied everything except a bucket has left a trace while reporting that it has not.

The original concern is answered rather than overruled. The bucket is removed only when it is tagged spawn:managed=true AND contains nothing outside ttl-reaper/; a bucket that fails either check is reported and kept, with --force-artifacts to override. So the liberty is only taken over a bucket that is provably spawn's and holds only spawn's artifacts.

The bucket is the one deploy used. Deploy records it on the function (spawn:artifact-bucket); --bucket overrides that, and is needed for a reaper deployed with --bucket by a spawn older than that record.

spawn reaper teardown [flags]

Flags:

FlagShortTypeDefaultDescription
--bucketstringArtifact bucket to remove (default: the one recorded on the function at deploy time, else spawn-reaper-artifacts-<account>-<region>)
--force-artifactsboolRemove the artifact bucket even if it is not tagged spawn:managed=true (for buckets created before the tag existed)
--if-idle-forduration0sOnly tear down if the reaper has reclaimed nothing for at least this long, at most 720h (the logs it reads); otherwise report and exit 0
--keep-artifactsboolLeave the artifact bucket in place (it is removed by default)
--keep-logsboolLeave the reaper's CloudWatch log group in place (it is removed by default)

spawn resources โ€‹

List every AWS resource spore.host created in an account/region, found by the spawn:managed=true tag via the Resource Groups Tagging API.

By default it lists resources created by you (your IAM principal). Use --all to include resources created by other principals in the account.

spawn resources [flags]

Flags:

FlagShortTypeDefaultDescription
--all-regionsboolSearch every enabled region
--allboolInclude resources created by other principals (default: only yours)
--regionstringAWS region (default: current region from AWS config)

spawn results โ€‹

Inspect task results in S3

spawn results

spawn results lifecycle โ€‹

Install spawn's tiering rules on a bucket (#1076, phase 3).

The rules move task outputs to cheaper storage by what they would cost to make again, using the tags spawn writes at upload:

spawn:regen-class=cheap Standard-IA at 30 days, Glacier IR at 90 spawn:regen-class=moderate Standard-IA at 60 days

Each rule also requires spawn:retain=false and a size of at least 128 KiB. So expensive and unclassified outputs, outputs you have marked with 'spawn results retain', outputs written before v0.133.0 and small files like logs are never moved. The rules only tier: nothing is ever deleted, and Glacier Instant Retrieval objects can still be read immediately.

Without --apply this is a dry run: it prints the rules, the bucket's other lifecycle rules (kept exactly as they are) and whether anything would change. With --apply it writes the configuration and reads it back to confirm. --remove takes spawn's rules out again and leaves everything else.

By default it works on this account's results bucket in the configured region. --bucket names any bucket you own, including your own output buckets. Run 'spawn results retention' first to see what the rules would move.

Tiering has costs, shown by the dry run: a request charge per object moved, a per-GB charge to read a tiered object back, and AWS's minimum storage duration (30 days in Standard-IA, 90 in Glacier IR).

Needs s3:GetLifecycleConfiguration and s3:PutLifecycleConfiguration on the bucket. Every call names your account as the expected bucket owner, so a mistyped bucket name that belongs to someone else fails instead of being changed.

spawn results lifecycle [flags]

Examples:

sh
# What would change on this account's results bucket
  spawn results lifecycle

  # Install the rules there
  spawn results lifecycle --apply

  # Your own output bucket
  spawn results lifecycle --bucket my-lab-results --apply

  # Take spawn's rules out again
  spawn results lifecycle --remove --apply

Flags:

FlagShortTypeDefaultDescription
--applyboolWrite the change (default: dry run)
--bucketstringBucket to work on (default: spawn-results-<account>-<region>)
--regionstringRegion for the default bucket (default: configured region)
--removeboolTake spawn's rules out instead of installing them

spawn results retain โ€‹

Set spawn:retain on task outputs (#1076).

spawn:retain=true takes an output out of every tiering rule, and out of any future deletion sweep. --off sets spawn:retain=false, which lets the rules apply. A URI ending in "/" covers every object under that prefix.

--off is also how outputs written before spawn:retain existed (v0.132.x) are opted in to tiering. They carry no spawn:retain tag, so no rule matches them, and they are kept until you run this.

S3 replaces an object's whole tag set on every write, so this command reads the existing tags and writes them back with only spawn:retain changed. Don't use a bare 'aws s3api put-object-tagging' for this: it would wipe the regeneration tags the rules match on. Only spawn outputs (objects tagged spawn:run-id) are changed. Anything else is listed and left alone.

Needs s3:GetObjectTagging and s3:PutObjectTagging on the objects, and s3:ListBucket for a prefix. On a versioned bucket it also needs s3:PutObjectVersionTagging, because it writes the tags of the exact version it read.

spawn results retain <s3-uri>... [flags]

Examples:

sh
# Keep one output
  spawn results retain s3://my-lab-results/project-x/final.bam

  # Keep a whole run's outputs
  spawn results retain s3://my-lab-results/project-x/run-7/

  # Let older (v0.132.x) outputs be tiered
  spawn results retain --off s3://spawn-results-123456789012-us-east-1/outputs/

Flags:

FlagShortTypeDefaultDescription
--offboolSet spawn:retain=false, letting the tiering rules apply

spawn results retention โ€‹

Report on task results by what they would cost to make again (#1076).

Since v0.132.1, task outputs are tagged when they're uploaded. The tags give the run's regeneration class: cheap is under $1 and under 1 hour, expensive is $25 or more, or 12 hours or more, and moderate is in between. Each output also gets a provenance record of the recipe, the inputs and their ETags, and the cost. This command reads a bucket and reports, run by run:

  • what is stored, and its monthly storage cost now;
  • what it would cost once the decided tiering rules had moved it. Cheap goes to Standard-IA at 30 days and Glacier IR at 90, and moderate goes to Standard-IA at 60. Expensive and unclassified outputs, and anything without spawn:retain=false, are never moved;
  • whether the deletion sweeper could prove the run regenerable today. That needs three things: the spec opted in (regenerable: true), the provenance record is readable, and every recorded input still exists with the same ETag and version. Each reason a run can't be proven is listed. An input you can't read counts as unproven, never as unchanged.

This command NEVER tiers, tags or deletes anything; it is a report. The tiering rules are installed separately, and only on request, by 'spawn results lifecycle --apply'. No deletion sweeper exists yet.

Storage prices are a static us-east-1 table, and every dollar figure says so. Objects with no spawn:run-id tag are listed as untracked and kept: logs, completion records, outputs written before v0.132.1, and outputs uploaded through the untagged fallback.

spawn results retention [flags]

Examples:

sh
# This account's default results bucket in the configured region
  spawn results retention

  # A caller bucket, one prefix, with every object listed
  spawn results retention --bucket my-lab-results --prefix project-x/ --objects

  # Machine-readable
  spawn results retention -o json

Flags:

FlagShortTypeDefaultDescription
--bucketstringBucket to report on (default: spawn-results-<account>-<region>)
--objectsboolList every object with where tiering would put it
--prefixstringOnly objects under this key prefix
--regionstringRegion for the default bucket (default: configured region)

spawn schedule โ€‹

Create, list, and manage scheduled executions of parameter sweeps.

Schedules run parameter sweeps at specified times via EventBridge Scheduler. No CLI running required - sweeps launch automatically at scheduled times.

Examples:

One-time execution โ€‹

spawn schedule create params.yaml --at "2026-01-23T02:00:00" --timezone "America/New_York"

Recurring daily at 2 AM โ€‹

spawn schedule create params.yaml --cron "0 2 * * *" --name "nightly-training"

Recurring with execution limit โ€‹

spawn schedule create params.yaml --cron "0 */4 * * *" --max-executions 100

List all schedules โ€‹

spawn schedule list

Cancel a schedule โ€‹

spawn schedule cancel <schedule-id>

spawn schedule

spawn schedule cancel โ€‹

Cancel a scheduled execution. This deletes everything 'spawn schedule create' made for it: the EventBridge schedule, the uploaded parameter file and the schedule's record. No further executions will occur. Cancelling a schedule that is already gone succeeds.

Examples: spawn schedule cancel sched-20260122-140530

spawn schedule cancel <schedule-id> [flags]

Flags:

FlagShortTypeDefaultDescription
--yes-yboolSkip the confirmation prompt

spawn schedule create โ€‹

Create a new scheduled execution of a parameter sweep.

Either --at (one-time) or --cron (recurring) is required.

Time formats: --at: ISO 8601 format (2026-01-23T02:00:00) --cron: Standard cron expression (minute hour day month weekday)

Examples:

One-time at specific time โ€‹

spawn schedule create params.yaml --at "2026-01-23T14:30:00"

Every day at 2 AM Eastern โ€‹

spawn schedule create params.yaml --cron "0 2 * * *" --timezone "America/New_York"

Every 6 hours for 30 days โ€‹

spawn schedule create params.yaml --cron "0 */6 * * *" --max-executions 120

Weekdays only at 9 AM โ€‹

spawn schedule create params.yaml --cron "0 9 * * 1-5"

spawn schedule create <params-file> [flags]

Flags:

FlagShortTypeDefaultDescription
--atstringOne-time execution time (ISO 8601 format)
--cronstringCron expression for recurring execution
--end-afterstringStop executing after this time (ISO 8601 format)
--max-executionsintMaximum number of executions (0 = unlimited)
--namestringFriendly name for this schedule
--regionstringus-east-1AWS region the sweep's instances launch in (the schedule itself always runs from us-east-1)
--timezonestringUTCIANA timezone (e.g., America/New_York)

spawn schedule list โ€‹

List all scheduled executions for the current user.

Examples:

List all schedules โ€‹

spawn schedule list

List only active schedules โ€‹

spawn schedule list --status active

spawn schedule list [flags]

Flags:

FlagShortTypeDefaultDescription
--statusstringFilter by status (active|paused|cancelled)

spawn schedule pause โ€‹

Pause a scheduled execution temporarily. The schedule remains but executions are disabled. Use 'resume' to re-enable.

Examples: spawn schedule pause sched-20260122-140530

spawn schedule pause <schedule-id>

spawn schedule resume โ€‹

Resume a paused scheduled execution. Executions will continue according to the schedule.

Examples: spawn schedule resume sched-20260122-140530

spawn schedule resume <schedule-id>

spawn schedule show โ€‹

Aliases: describe

Show detailed information about a scheduled execution including configuration, execution history, and next run time.

Examples: spawn schedule show sched-20260122-140530

spawn schedule show <schedule-id>

spawn service โ€‹

Launch an instance, run a long-lived HTTP service on it, and open a local tunnel to whatever port the service chose (spawn#409).

The service must print exactly one JSON readiness line to stdout when it starts serving:

{"event":"ready","addr":"127.0.0.1:54321","provenance":{"sourceHash":"โ€ฆ"}}

event discriminator, so ordinary log lines are ignored addr the address the service ACTUALLY bound, after :0 resolution token optional access credential, carried into the printed URL

The service picks its own port โ€” only it knows what is free โ€” and announces it, so spawn never polls and hopes. spawn appends "--addr 127.0.0.1:0" to your command (change it with --addr-args) and forwards a local port to the announced address.

spawn holds the tunnel until you interrupt it or the instance's lifetime ends, then terminates the instance. The service listens on the instance's loopback and is reachable only through the tunnel โ€” it is never exposed to the internet.

Put spawn's flags FIRST and separate your command with "--". Everything after the "--" belongs to your service, including its own flags. Without the separator, anything dash-shaped in your command is read as a flag to spawn โ€” so "spawn service python3 -m app.serve" fails with "unknown shorthand flag: 'm'", naming a flag you never passed to spawn.

Examples:

Launch an instance, upload a binary, serve it, tunnel to it โ€‹

spawn service --instance-type m7i.large --upload ./my-server --ttl 2h -- ./my-server

A command with its own flags โ€” this is why the "--" matters โ€‹

spawn service --instance-type m7i.large --ttl 1h -- python3 -m myapp.serve

A service whose address flag isn't --addr: say how to pass it โ€‹

spawn service --instance-type m7i.large --ttl 1h --addr-args "--listen 127.0.0.1:0" -- ./my-server spawn service --instance-type m7i.large --ttl 1h -- node --enable-source-maps server.js

Run something already baked into the AMI โ€‹

spawn service --instance-type m7i.large --ttl 30m -- /opt/tools/dashboard

Use an instance that is already running (it is not terminated afterwards) โ€‹

spawn service --host my-box --upload ./my-server -- ./my-server

Preview without launching โ€‹

spawn service --instance-type m7i.large --ttl 1h --dry-run -- ./my-server

Full contract, including how to make a binary spawnable: https://github.com/spore-host/spawn/blob/main/docs/service-readiness-contract.md

spawn service [flags] -- <command> [args...]

Flags:

FlagShortTypeDefaultDescription
--addr-argsstring--addr 127.0.0.1:0Arguments telling the service where to listen; pass an empty string to append nothing
--amistringAMI to launch (default: the recommended AMI for the instance type)
--boot-timeoutduration0sHow long to wait for the readiness line (default 2m; raise it for a service that does heavy work before serving)
--dry-runboolPrint the plan without launching anything
--hoststringRun on an instance that is already running (name or instance ID); it is not terminated afterwards
--idle-timeoutstringTerminate the instance after this much idleness (e.g. 30m)
--instance-typestringEC2 instance type to launch (required unless --host is given)
--keystringSSH private key (default: the instance's launch key)
--local-portintLocal port for the tunnel (default: a free port)
--namestringName tag for the instance (default: spawn-service)
--openboolOpen the service URL in a browser once it is ready
--remote-pathstringWhere --upload lands on the instance (default: /tmp/spawn-service-bin)
--security-group-idsstringSliceSecurity groups for the instance
--spotboolLaunch as a spot instance (cheaper; an interruption ends the service)
--subnet-idstringSubnet to launch into
--ttlstringTerminate the instance after this long (e.g. 2h). With no --ttl and no --idle-timeout, a 1h idle timeout is applied
--uploadstringLocal file to copy to the instance before starting (usually the service binary)
--userstringSSH user (default: the instance's spawn:local-username tag, else ec2-user)

spawn slurm โ€‹

Parse and convert Slurm batch scripts to spawn parameter files.

This enables HPC users to migrate existing Slurm workflows to the cloud with minimal changes. Supports array jobs, MPI jobs, and GPU jobs.

Examples:

Convert Slurm script to spawn parameters โ€‹

spawn slurm convert job.sbatch --output-file params.yaml

Estimate cost before running โ€‹

spawn slurm estimate job.sbatch

Convert and submit in one step (for spot, put "#SPAWN --spot=true" in the script) โ€‹

spawn slurm submit job.sbatch

spawn slurm

spawn slurm convert โ€‹

Parse a Slurm batch script and convert it to spawn parameter format.

The generated parameter file can be reviewed and edited before launching.

Supported Slurm directives: --array=N-M โ†’ Parameter sweep with M-N+1 tasks --time=HH:MM:SS โ†’ TTL for each instance --mem=XGB โ†’ Memory requirement for instance selection --cpus-per-task=N โ†’ CPU requirement for instance selection --gres=gpu:N โ†’ GPU requirement and instance selection --nodes=N โ†’ Refused when N > 1 (launch with spawn launch --mpi) --job-name=NAME โ†’ Instance name prefix

Custom #SPAWN directives (optional): #SPAWN --instance-type=TYPE โ†’ Override instance type selection #SPAWN --region=REGION โ†’ Override region #SPAWN --spot=true โ†’ Enable spot instances #SPAWN --ami=AMI_ID โ†’ Override AMI

Each array task (or the single job) becomes one row whose command: is the job script, with SLURM_* variables exported. Multi-node MPI jobs (--nodes > 1) cannot be expressed as a parameter file and are refused.

Launch the file in the foreground (--no-detach): a detached sweep does not run row commands yet. An --array=...%N limit becomes --max-concurrent N.

Example: spawn slurm convert train.sbatch --output-file params.yaml spawn launch train --param-file params.yaml --no-detach

spawn slurm convert <script.sbatch> [flags]

Flags:

FlagShortTypeDefaultDescription
--output-filestringOutput parameter file (default: stdout)

spawn slurm estimate โ€‹

Parse a Slurm batch script and estimate the cloud cost.

Provides a cost comparison between institutional cluster (free but queued) and cloud (paid but immediate).

Example: spawn slurm estimate train.sbatch

spawn slurm estimate <script.sbatch> [flags]

Flags:

FlagShortTypeDefaultDescription
--regionstringRegion to price the estimate in (default: #SPAWN --region, else your AWS config region)

spawn slurm submit โ€‹

Parse a Slurm batch script, convert to spawn parameters, and launch immediately.

This is a convenience command that combines 'convert' and 'launch' in one step. For complex jobs, consider using 'convert' first to review the generated parameters.

Spot instances come from the script ("#SPAWN --spot=true"); there is no --spot flag.

Example: spawn slurm submit train.sbatch --yes

spawn slurm submit <script.sbatch> [flags]

Flags:

FlagShortTypeDefaultDescription
--regionstringRegion to price the estimate in (default: #SPAWN --region, else your AWS config region)
--yes-yboolSkip confirmation prompt

spawn snapshot โ€‹

Create EBS snapshots from raw disk images without launching an EC2 instance, so large reference data (a Kraken2 DB, BLAST index, ML weights) can be attached to spores via 'spawn launch --attach-volume' instead of being baked into a custom AMI.

spawn snapshot

spawn snapshot create โ€‹

Populate a new EBS snapshot directly using the EBS direct APIs โ€” no EC2 instance and no attached volume. The result is a snapshot you can attach with 'spawn launch --attach-volume snap-xxx:/mount'.

--from accepts any of:

  • a directory โ†’ its contents are packed into an ext4 filesystem image
  • a .tar/.tar.gz/.tgz archive โ†’ unpacked into an ext4 filesystem image
  • a raw disk image โ†’ streamed verbatim (its bytes ARE the block device)

Directories and tarballs are converted to ext4 in-process (pure Go โ€” no mkfs and no builder instance), so this works the same from macOS, Linux, or Windows. The ext4 filesystem is sized to the data and capped at --size.

For a directory or tarball source, the ext4 image is built in a local temp file first (~the uncompressed data size โ€” e.g. ~16 GB for a 16 GB DB) and removed when done; ensure that much free space, or use --temp-dir to point at a roomier disk. A raw image needs no scratch (it streams source โ†’ snapshot directly). Memory stays low regardless of size (the upload streams blocks concurrently, never buffering the whole image).

The upload sends the uncompressed image to AWS over your connection; for a large DB over a slow uplink, run this from AWS CloudShell or a small in-region EC2 instance so the upload is AWS-internal.

Credentials & permissions: this command runs entirely with YOUR credentials โ€” it does NOT launch or use a spawn-managed instance. Whoever runs it needs the EBS-direct snapshot actions ebs:StartSnapshot, ebs:PutSnapshotBlock, ebs:CompleteSnapshot (plus ec2:DescribeSnapshots) and, for an s3:// --from, read on the source bucket (s3:ListBucket + s3:GetObject).

A stock 'spawn launch' instance runs as the shared spored-instance-role, which does NOT have these permissions โ€” so building a snapshot from such an instance fails with AccessDenied. To build in-region, use AWS CloudShell, your own IAM-user credentials, or a 'spawn launch' instance you gave the perms via --iam-policy-file (see docs/reference-data-volumes.md and examples/iam/snapshot-build-policy.json for a ready-to-use policy).

Examples:

From a directory: โ€‹

spawn snapshot create --from ./kraken2-db/ --size 20 --name kraken2-k2pluspf

From a tarball (local or in S3): โ€‹

spawn snapshot create --from ./k2_pluspf.tar.gz --size 20 --name kraken2 spawn snapshot create --from s3://genome-idx/k2_pluspf.tar.gz --size 20
--name kraken2 --region us-east-1

From a raw filesystem image you already built: โ€‹

spawn snapshot create --from ./kraken2.raw --size 20 --name kraken2

spawn snapshot create [flags]

Flags:

FlagShortTypeDefaultDescription
--descriptionstringSnapshot description
--encryptedboolCreate an encrypted snapshot
--fromstringSource: a directory, a .tar/.tar.gz/.tgz, or a raw disk image โ€” local path or s3://bucket/key (required)
--kms-keystringCustomer-managed KMS key ARN for encryption (implies --encrypted)
--namestringName tag for the snapshot (also sets spawn:snapshot-name)
--regionstringAWS region (default: the configured region)
--sizeint64Volume size in GiB the snapshot is built for; the image must fit (required)
--tagstringArrayCustom tag key=value to set on the snapshot (repeatable). Merged with the spawn:* baseline; cannot override a spawn: tag.
--temp-dirstringDirectory for the temporary ext4 image built from a dir/tarball source (default: system temp). Point at a roomy disk for large data.

spawn snapshot mount โ€‹

Convenience for the head-node side of the reference-data-volume recipe: create an EBS volume from a snapshot, attach it to the instance this command runs on, and mount it (read-only by default) at <mount-point>.

This only works when run ON an EC2 instance (it identifies itself via IMDS). It's the one-command equivalent of: aws ec2 create-volume --snapshot-id โ€ฆ && aws ec2 attach-volume โ€ฆ && sudo mount -o ro โ€ฆ. Use it on a spawn head node (or any EC2 box running 'nextflow run') so an nf-core pipeline's head-side db_path validation finds the DB. Tasks don't need this โ€” 'spawn launch --attach-volume' mounts the volume on each task automatically.

Example: sudo spawn snapshot mount snap-0abc123 /opt/databases/kraken2

spawn snapshot mount <snapshot-id> <mount-point> [flags]

Flags:

FlagShortTypeDefaultDescription
--rwboolMount read-write (default: read-only โ€” the right choice for shared reference data)

spawn start โ€‹

Start a stopped or hibernated instance.

The TTL deadline is absolute: it keeps counting while the instance is stopped, and stopping or starting does not move it. Only 'spawn extend' does.

spawn start [instance-id-or-name] [flags]

Flags:

FlagShortTypeDefaultDescription
--job-array-idstringStart all instances in job array by ID
--job-array-namestringStart all instances in job array by name

spawn status โ€‹

Show an instance's status as spored reports it, with lifecycle, cost and DNS notices

spawn status <instance-id> [flags]

Flags:

FlagShortTypeDefaultDescription
--check-completeboolCheck completion status and exit with standardized codes (0=complete, 1=failed, 2=running, 3=error)

spawn stop โ€‹

Stop a running instance (preserves EBS volumes).

The TTL deadline is absolute: it keeps counting while the instance is stopped, and stopping or starting does not move it. Only 'spawn extend' does.

spawn stop [instance-id-or-name] [flags]

Flags:

FlagShortTypeDefaultDescription
--job-array-idstringStop all instances in job array by ID
--job-array-namestringStop all instances in job array by name
--yes-yboolSkip the confirmation prompt

spawn sweep โ€‹

Manage parameter sweeps: list, check status, cancel, resume, and collect results.

Examples: spawn sweep list spawn sweep status sweep-20260116-abc123 spawn sweep cancel sweep-20260116-abc123 spawn sweep resume sweep-20260116-abc123 --max-concurrent 5 spawn sweep collect sweep-20260116-abc123 --output-file results.json

spawn sweep

spawn sweep cancel โ€‹

Cancel a running parameter sweep and terminate its instances

spawn sweep cancel <sweep-id> [flags]

Flags:

FlagShortTypeDefaultDescription
--yes-yboolSkip the confirmation prompt

spawn sweep collect โ€‹

Download and aggregate results from a completed sweep

spawn sweep collect <sweep-id> [flags]

Flags:

FlagShortTypeDefaultDescription
--bestintShow only top N results by metric (0 = all)
--formatstringjsonOutput format: json, csv, jsonl
--metricstringMetric to rank results by (e.g. accuracy, loss)
--output-file-fstringresults.jsonOutput file path
--regions-rstringSliceRegions to collect from (comma-separated or repeated; default: all)
--s3-prefixstringCustom S3 prefix for results (default: auto-detect)

spawn sweep list โ€‹

List parameter sweeps

spawn sweep list [flags]

Flags:

FlagShortTypeDefaultDescription
--lastint20Show last N sweeps
--regionstringFilter by region
--sincestringShow sweeps created after date (YYYY-MM-DD)
--statusstringFilter by status (RUNNING, COMPLETED, FAILED, CANCELLED)

spawn sweep resume โ€‹

Resume an interrupted parameter sweep from checkpoint

spawn sweep resume <sweep-id> [flags]

Flags:

FlagShortTypeDefaultDescription
--allow-missing-endpointsboolWith --detach, for a sweep launched with --no-public-ip: resume even when a pinned subnet no longer has a VPC endpoint or NAT route its members need. The resume re-checks each pending member's subnet first, and refuses if one fails. A foreground resume uses the sweep's own --allow-missing-endpoints
--completion-webhook-urlstringThe sweep's --completion-webhook-url, passed again: the checkpoint does not store it, since it may carry a token. Required when the sweep was launched with it. Not supported with --detach
--cost-limitfloat64Cost limit in USD for each relaunched member, replacing the sweep's --cost-limit; may not be higher than it. A row's own cost_limit: still wins. Not supported with --detach
--detachboolResume a detached sweep (the default for a parameter sweep): re-invoke the sweep orchestrator from its record. A --no-detach sweep resumes without it
--idle-timeoutstringIdle timeout for each relaunched member, replacing the sweep's --idle-timeout; may not be longer than it. A row's own idle_timeout: still wins. Not supported with --detach
--keep-on-errorboolKeep a relaunched instance whose spored never came up instead of terminating it. It then has no TTL/idle/cost-limit enforcement until spored is confirmed running
--max-concurrent-autoboolRe-derive max concurrent instances from the account's real AWS quota headroom for the pending parameter sets' instance type(s)/region, instead of the original or a user-supplied number (spawn#494). Not yet supported with --detach.
--max-concurrentintOverride max concurrent instances (0 = use original)
--spot-webhook-urlstringThe sweep's --spot-webhook-url, passed again: the checkpoint does not store it, since it may carry a token. Required when the sweep was launched with it. Not supported with --detach
--ttlstringTime to live for each relaunched member (e.g. 4h, 1d), replacing the sweep's --ttl; may not be longer than it. A row's own ttl: still wins. Not supported with --detach
--user-datastringThe sweep's --user-data, passed again: the checkpoint does not store it, since it may carry a token. Required when the sweep was launched with it. Not supported with --detach
--webhook-correlationstringThe sweep's --webhook-correlation, passed again: the checkpoint does not store it, since it may carry a token. Required when the sweep was launched with it. Not supported with --detach

spawn sweep setup โ€‹

Create SpawnSweepCrossAccountRole in the account detached sweeps launch in, or bring an existing one up to date: its trust (the sweep orchestrator's role, and nothing else) and its policy.

You do not need to run this: every detached sweep does the same before it creates anything else. It is here to set an account up ahead of time, and to update the role with credentials that may manage IAM when the ones that launch sweeps may not.

The account is the compute account: your own credentials', unless SPAWN_COMPUTE_PROFILE or 'spawn defaults set compute-profile' names another.

spawn refuses to create the role in, or trusting, an AWS Organizations management account.

'spawn sweep teardown' removes it.

spawn sweep setup

spawn sweep status โ€‹

Show parameter sweep status and progress

spawn sweep status <sweep-id> [flags]

Flags:

FlagShortTypeDefaultDescription
--check-completeboolExit with standardized codes: 0=complete 1=failed 2=running 3=error

spawn sweep teardown โ€‹

Delete SpawnSweepCrossAccountRole and every policy on it from the compute account.

Detached sweeps in this account stop working until the role is back; the next detached sweep, or 'spawn sweep setup', creates it again.

It refuses while a sweep whose members launch in this account is still running (any status but COMPLETED, FAILED or CANCELLED in the orchestration table), or when it cannot read that table: the orchestrator would lose the role in the middle of launching or cancelling them. --force deletes the role anyway.

spawn sweep teardown [flags]

Flags:

FlagShortTypeDefaultDescription
--forceboolDelete the role even while a sweep in this account is running, or when that cannot be checked

spawn task โ€‹

Work with a single launched instance as a "task".

spawn task run --spec <file> launch a task from a TaskSpec (stage, run, completion record) spawn task status <task-id> read a task's durable completion record from S3 spawn task diagnose <name|instance-id> one-screen summary + likely cause

spawn task

spawn task diagnose โ€‹

Summarize an instance's state, cost, and likely failure cause

spawn task diagnose <name|instance-id>

spawn task run โ€‹

Run a task described by a TaskSpec JSON file (the shared workflow-adapter contract, spawn#386).

Sizing picks the cheapest type that fits, and on a price TIE the smallest that fits โ€” which matters on a family like hpc7g where every size costs the same because you rent the socket rather than the cores, so a 16-vCPU request returns hpc7g.4xlarge and not the 64-vCPU hpc7g.16xlarge (spawn#610).

To choose the type yourself, set resources.instance_type in the spec: that pins it exactly and skips candidate search and price ranking altogether (cpu, memory_gib, architecture and families are then ignored). That is the way to sweep several sizes of one family deliberately, since cpu/memory can't distinguish equal-spec sizes. resources.families narrows sizing to an allow-list without pinning a single type.

Once the type is chosen, spawn launches an ephemeral instance that stages inputs from S3, runs the command, stages outputs back, and writes a durable completion record to s3://spawn-results-<account>-<region>/tasks/<task_id>/completion.json โ€” the signal workflow adapters poll. The instance self-terminates on completion (TTL + on_complete).

If spec.container is set, the command runs inside that image (Docker is installed on demand; a private-ECR image is pulled with an ecr:ReadOnly grant, GPUs passed with --gpus all). Otherwise it runs on the host. A container task is sized to at least 2 GiB of memory even when resources.memory_gib is lower or unset, because the Docker install is OOM-killed on smaller boxes; a pinned resources.instance_type is honoured as given, with a warning if it is below that. If Docker cannot be installed or its daemon does not start, the record reports retry_class instance_health (retryable), not app_error.

A container gets Docker's default 64 MB /dev/shm, which many-rank MPI (Open MPI's shared-memory transport), PyTorch DataLoader workers and Ray outgrow: an Open MPI run with 64 ranks on one box dies with SIGBUS in its first collective. Set resources.shm_gib to raise it (passed as docker run --shm-size=<n>g). It must be a positive number of GiB, needs a container, and may not exceed the instance's memory: memory_gib with headroom (or the 2 GiB container floor) for a sized spec, the type's memory for a pinned instance_type. /dev/shm is RAM-backed, so size memory_gib to cover it as well as the workload.

What gets bind-mounted, and as whom: spawn pre-creates the parent directory of every inputs[].destination and outputs[].source โ€” plus any EFS/FSx/volume mount point from placement โ€” as the instance user, and bind-mounts exactly those paths into the container. The container then runs as that same uid:gid rather than the image's declared USER (spawn#555), so the staged directories are writable whatever the image happens to declare; every staged input is also chown'd to that uid so it can be deleted as well as read (spawn#565). Practical upshot: any absolute path works, the image's USER is irrelevant, and you do not need to keep staged paths flat in /tmp. A manifest path ending in "/" is a directory and is staged recursively in both directions (spawn#564). A directory input that copies no objects (its prefix is empty or missing, often because the task that writes it failed) fails stage-in as staging_error; set allow_empty: true on that input if an empty directory is expected (spawn#1207).

A container's /tmp is its own tmpfs (docker run --tmpfs), RAM-backed and capped at half of instance memory like the host's AL2023 /tmp, so scratch written there uses memory, not the root disk; staged directories under /tmp are mounted on top of it. The exception is a manifest path directly in /tmp (such as /tmp/run.sh): then the host's /tmp is bind-mounted instead, as before (spawn#1270). command.log says which.

A workflow engine that starts its own task containers (Cromwell's local backend, miniwdl, Nextflow with docker.enabled) can run as a container task with container_docker_socket: true. It bind-mounts the host's /var/run/docker.sock into the container and adds the socket's group; --user is unchanged. This is ROOT-EQUIVALENT ON THE INSTANCE: anything that can reach dockerd can start a privileged container that mounts the host's /, so set it only for an image you trust. It needs container, and is refused for a pooled task, where one task could control the others on the shared worker. The containers the engine starts are siblings on the host, so paths it hands them must be host paths: use the staged or placement-mounted directories, not the engine container's own /tmp. The provenance record notes the socket, and such a run is never proven regenerable, because the engine's images are not recorded (spawn#1231).

Staging space is NOT resources.disk_gib unless you stage onto the root filesystem. disk_gib sizes the root EBS volume, which is where an ordinary path like /work lives โ€” so that is the knob for a large staged input. /tmp is different: on AL2023 it is a tmpfs, RAM-backed and capped near half of instance memory by default, so staging a 40 GiB index into /tmp fails on a 32 GiB box no matter how large disk_gib is. Stage big inputs to a non-/tmp path and size disk_gib, or keep /tmp and size memory_gib for the staging footprint โ€” the latter tends to pick the instance FAMILY rather than just its size, so the two are not interchangeable on cost.

The launch AMI is auto-selected from the sized instance type: a GPU family (g5, g6, p4/p5, โ€ฆ) gets the AL2023 NVIDIA DLAMI so --gpus all lands on a host with a driver (spawn#601), and everything else gets the standard AL2023 for the type's architecture. Pin a specific AMI with --ami (or placement.ami in the spec); an explicit AMI always wins over auto-selection.

A task launches into the region's default VPC unless the spec names a subnet with placement.subnet_id, as --subnet-id does for spawn launch. In a region with no default VPC, usual for Control Tower and Landing Zone Accelerator accounts, a spec without one fails before launching and lists subnets to use (spawn#1267).

Re-running the same task_id is safe with --wait: the results of the previous attempt are cleared at launch, and every run stamps a run_id into its completion record, so --wait ignores any record that isn't from the run it just launched instead of reporting an earlier attempt's verdict (#608).

--dry-run sizes and prints the plan without launching.

spawn task run --spec <file> [flags]

Flags:

FlagShortTypeDefaultDescription
--amistringPin a specific AMI (overrides auto-selection and placement.ami); empty = auto-select from the sized instance type (GPU DLAMI for GPU families)
--dry-runboolSize and preview the task without launching
--poll-intervalduration15sHow often to poll for completion when --wait is set
--regionstringRegion to size against (default: the configured AWS region)
--specstringPath to a TaskSpec JSON file (required)
--waitboolBlock until the task's completion record appears, then exit with its exit code; a task whose state is not completed exits 1 even if its command exited 0 (e.g. a declared output failed to upload)

spawn task status โ€‹

Read the completion record a 'spawn task run' task wrote to s3://spawn-results-<account>-<region>/tasks/<task-id>/completion.json.

If the record isn't there, status asks EC2 about the task's instance: a live instance means the task is still running; a terminated one with no record is reported as terminated, never as running, with the outcome of spored's terminal flush (the spawn:flush-status tag) while EC2 still lists the instance, about an hour after it ends. A record is followed by a Flush: line. With --check-complete, exit codes mirror 'spawn status': 0=completed, 1=failed (including terminated without a record), 2=running, 3=error (including no record and no instance found).

spawn task status <task-id> [flags]

Flags:

FlagShortTypeDefaultDescription
--check-completeboolExit 0=completed, 1=failed, 2=running, 3=error instead of printing
--regionstringRegion the task ran in (default: the configured AWS region)
--results-prefixstrings3://bucket/prefix the task's records were written under; required if the spec set results_prefix (default: spawn's own spawn-results-<account>-<region>/tasks)

spawn team โ€‹

Create and manage teams for sharing spawn instances and sweeps

spawn team

spawn team add โ€‹

Add a member to a team (owner only)

spawn team add <team_id> <iam_arn>

spawn team create โ€‹

Create a new team

spawn team create [flags]

Flags:

FlagShortTypeDefaultDescription
--descriptionstringTeam description
--namestringTeam name (required)

spawn team delete โ€‹

Delete a team and all memberships (owner only)

spawn team delete <team_id> [flags]

Flags:

FlagShortTypeDefaultDescription
--yes-yboolSkip the confirmation prompt

spawn team list โ€‹

List teams you own or belong to

spawn team list

spawn team remove โ€‹

Remove a member from a team (owner only)

spawn team remove <team_id> <iam_arn> [flags]

Flags:

FlagShortTypeDefaultDescription
--yes-yboolSkip the confirmation prompt

spawn team show โ€‹

Show team details and member list

spawn team show <team_id>

spawn terminate โ€‹

Permanently terminate an instance. This is irreversible: the instance is destroyed and any non-persisted volumes are deleted. Use stop or hibernate to keep EBS volumes.

A running 'spawn task run' instance first has its command.log and a terminal completion record (terminal_reason user_terminated) flushed to S3 over SSM, as a TTL or cost-limit kill does. The flush is bounded and best-effort: if it fails, the instance is terminated anyway.

Terminate a single instance by ID or name, or an entire job array:

spawn terminate i-0abc123 spawn terminate my-instance --yes spawn terminate --job-array-name training

spawn terminate [instance-id-or-name] [flags]

Flags:

FlagShortTypeDefaultDescription
--job-array-idstringTerminate all instances in job array by ID
--job-array-namestringTerminate all instances in job array by name
--yes-yboolSkip the confirmation prompt

spawn upgrade-spored โ€‹

Replace the spored lifecycle agent on a running instance with a newer release WITHOUT terminating/relaunching the instance and without losing spored's lifecycle state (the TTL deadline, accumulated compute-seconds, and the completion / pre-stop / idle / FSx config live in EC2 tags that the new spored re-reads on boot, and the settings fixed at launch in the launch config object cached on the instance).

An upgrade across v0.150.0, the first spored that reads those settings only from the launch config object, is refused when the instance keeps them in the other place: tags on an instance launched by an older spawn, or an object an older spored would not read.

The default target is this spawn's own version, the spored a launch by this spawn installs (for a development build of spawn, which has no published spored, the latest release); pin another with --version. A downgrade is refused unless --allow-downgrade is given. The swap is driven over SSM (keyless โ€” works on private-subnet / no-public-IP instances), so the instance must have the SSM agent online and an instance profile (the spored role attaches AmazonSSMManagedInstanceCore, so spawn-launched instances already qualify).

The TTL deadline is absolute and tag-stored, so it is NOT reset by the restart โ€” an instance mid-life keeps its original termination time. Linux only for now (Windows spored upgrade is a follow-up, #234).

spawn upgrade-spored <instance-id|name> [flags]

Flags:

FlagShortTypeDefaultDescription
--allow-downgradeboolAllow a downgrade (target older than the running version)
--timeoutduration5m0sHow long to wait for the on-instance upgrade to complete
--versionstringTarget spored version (e.g. 0.64.0); default: this spawn's version (latest release for a dev build)
--yes-yboolSkip the confirmation prompt

spawn validate โ€‹

Validate spawn instances and configuration against compliance controls.

This command can validate:

  • Running instances against compliance controls (NIST 800-171, NIST 800-53)
  • Infrastructure resources (DynamoDB, S3, Lambda, CloudWatch)
  • Launch configuration before launching instances

Examples:

Validate all running instances against NIST 800-171 โ€‹

spawn validate --nist-800-171

Validate specific instance โ€‹

spawn validate --instance-id i-0abc123 --nist-800-171

Validate infrastructure resources โ€‹

spawn validate --infrastructure

Output as JSON for automation โ€‹

spawn validate --nist-800-171 -o json

spawn validate [flags]

Flags:

FlagShortTypeDefaultDescription
--infrastructureboolValidate infrastructure resources (DynamoDB, S3, Lambda)
--instance-idstringSpecific instance ID to validate
--nist-800-171boolValidate NIST 800-171 Rev 3 compliance
--nist-800-53stringValidate NIST 800-53 compliance at a baseline: low, moderate, high (default low)
--regionstringAWS region to validate (default: all regions)

spawn version โ€‹

Display version, build date, and git commit information for spawn.

spawn version