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.
| Flag | Short | Type | Default | Description |
|---|---|---|---|---|
--accessibility | bool | Enable accessibility mode (implies --no-emoji) | ||
--account | string | Expected AWS account ID (optional guard) | ||
--lang | string | Language for output (en, es, fr, de, ja, pt) | ||
--no-color | bool | Disable colorized output | ||
--no-emoji | bool | Disable emoji in output | ||
--output | -o | string | table | Output format (table, json) |
--profile | string | AWS named profile (overrides SPORE_PROFILE/AWS_PROFILE and the shared config) | ||
--region | string | Default AWS region (overrides SPORE_REGION/AWS_REGION and the shared config) | ||
--verbose | -v | bool | Enable 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 amispawn 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:
| Flag | Short | Type | Default | Description |
|---|---|---|---|---|
--kms-key | string | KMS key in the target region to encrypt the copy with (default: aws/ebs if the source is encrypted) | ||
--name | string | Name for the copy (default: the source AMI's name) | ||
--region | string | Region the source AMI is in (default: current region from AWS config) | ||
--to-region | string | Region to copy the AMI to (required) | ||
--wait-timeout | duration | 1h0m0s | How long --wait waits before giving up (the copy itself continues) | |
--wait | bool | Wait 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:
| Flag | Short | Type | Default | Description |
|---|---|---|---|---|
--description | string | Description for the AMI | ||
--force | bool | Create 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 | ||
--name | string | Name for the AMI (required) | ||
--reboot | bool | Reboot instance before creating AMI (default: no-reboot) | ||
--tag | stringArray | Tags in key=value format | ||
--wait | bool | Wait 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:
| Flag | Short | Type | Default | Description |
|---|---|---|---|---|
--region | string | AWS region (default: current region from AWS config) | ||
--yes | -y | bool | Skip the confirmation prompt |
spawn ami list โ
List spawn-managed AMIs
spawn ami list [flags]Flags:
| Flag | Short | Type | Default | Description |
|---|---|---|---|---|
--arch | string | Filter by architecture (x86_64 or arm64) | ||
--deprecated | bool | Show deprecated AMIs | ||
--gpu | string | Filter by GPU support (true or false) | ||
--region | string | AWS region (default: current region from AWS config) | ||
--stack | string | Filter by stack (spawn:stack tag) | ||
--version | string | Filter 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:
| Flag | Short | Type | Default | Description |
|---|---|---|---|---|
--region | string | AWS 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 appFlags:
| Flag | Short | Type | Default | Description |
|---|---|---|---|---|
--catalog | string | Local 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:
| Flag | Short | Type | Default | Description |
|---|---|---|---|---|
--app-version | string | App container image tag to launch (default: catalog default; see 'spawn app list') | ||
--health-path | string | HTTP path probed for web-app readiness (default "/") | ||
--idle-timeout | string | Stop when DCV has no clients for this duration (default: catalog default) | ||
--image | string | Launch 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-type | string | Override instance type (default: first catalog family + .xlarge) | ||
--name | string | Session name (default: <app>-<timestamp>) | ||
--no-open | bool | Write session file but do not open browser automatically | ||
--no-web-auth | bool | Disable the spored :443 access-token gate for a web app (the app must provide its own auth) | ||
--region | string | AWS region (default: from AWS config) | ||
--spot | bool | Use Spot pricing | ||
--ttl | string | 8h | Hard termination deadline (e.g. 4h, 8h, 1d). Always set: idle only stops the instance, so the TTL is what ends an abandoned session | |
--web-arg | stringArray | Extra argument for a web app's container, repeatable (e.g. --web-arg=--bind-addr=0.0.0.0:8080) | ||
--web-port | int | Launch --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 listspawn 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 arrayspawn array cancel โ
Terminate a job array's instances
spawn array cancel <array-name> [flags]Flags:
| Flag | Short | Type | Default | Description |
|---|---|---|---|---|
--pending | bool | Only terminate members that are not actively running | ||
--region | string | Region to search (default: all regions) | ||
--yes | -y | bool | Skip the confirmation prompt |
spawn array collect โ
Report where each member's results are (per-index)
spawn array collect <array-name> [dest-dir] [flags]Flags:
| Flag | Short | Type | Default | Description |
|---|---|---|---|---|
--output-dir | string | Destination directory hint for results | ||
--region | string | Region 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:
| Flag | Short | Type | Default | Description |
|---|---|---|---|---|
--index | int | Array member index to fetch logs for | ||
--lines | int | 200 | Number of trailing lines to show | |
--region | string | Region to search (default: all regions) | ||
--which | string | command | Which 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:
| Flag | Short | Type | Default | Description |
|---|---|---|---|---|
--failed | bool | Relaunch the missing/failed indexes (required) | ||
--region | string | Region to search (default: all regions) | ||
--yes | -y | bool | Skip 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:
| Flag | Short | Type | Default | Description |
|---|---|---|---|---|
--region | string | Region 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:
| Flag | Short | Type | Default | Description |
|---|---|---|---|---|
--instance-type | string | Instance type to check (required) | ||
--regions | -r | stringSlice | Regions 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:
# 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 2hFlags:
| Flag | Short | Type | Default | Description |
|---|---|---|---|---|
--ami | string | Linux AMI ID (default: the newest self-owned spawn-* AMI that fits --instance-type, else Amazon Linux 2023) | ||
--count | int | 1 | Number of instances to launch | |
--idle-timeout | string | Also terminate an instance after it has been idle this long (e.g. 1h). Empty disables the idle terminate. | ||
--instance-profile | string | Attach 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-type | string | t3.micro | EC2 instance type | |
--job-array-id | string | Job array ID to join (required) | ||
--job-array-name | string | Job array name, used by spawn array status/cancel (defaults to the job array ID) | ||
--keep-on-error | bool | Keep 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-name | string | SSH key pair name | ||
--security-group-ids | stringSlice | Security group IDs (comma-separated or repeated) | ||
--spot | bool | Use Spot instances | ||
--subnet-id | string | Subnet ID | ||
--ttl | string | 8h | Terminate 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-blockspawn 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:
| Flag | Short | Type | Default | Description |
|---|---|---|---|---|
--count | int32 | 1 | Number of instances in the block | |
--dry-run | bool | Preview the price and terms without purchasing (no charge, no write API call) | ||
--duration-hours | int32 | Capacity Block duration in hours (required) | ||
--instance-type | string | Instance type of the offering, e.g. p5.48xlarge (required) | ||
--platform | string | Linux/UNIX | Instance platform (Linux/UNIX, Windows, ...) | |
--region | string | AWS region of the offering (required) | ||
--tag | stringArray | Tag 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:
| Flag | Short | Type | Default | Description |
|---|---|---|---|---|
--all-regions | bool | Clean up every enabled region | ||
--all | bool | Include resources created by other principals (default: only yours) | ||
--buckets | bool | Delete 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-run | bool | Preview what would be removed without deleting anything | ||
--elastic-ips | bool | Release only orphaned spawn launch Elastic IPs (unassociated, instance gone); nothing else is touched | ||
--instance-roles | bool | Delete 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-queues | bool | Delete 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 | ||
--region | string | AWS region (default: current region from AWS config) | ||
--schedule-params | bool | Delete 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 | -y | bool | Skip 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:
| Flag | Short | Type | Default | Description |
|---|---|---|---|---|
--key | string | SSH private key path | ||
--no-start | bool | Do not automatically start a stopped/hibernated instance | ||
--port | int | 22 | SSH port | |
--rdp-port | int | 13389 | Windows --rdp --via-ssm: local port for the SSM RDP tunnel | |
--rdp | bool | Windows: open a Remote Desktop (RDP) connection (decrypts the Administrator password) | ||
--session-manager | bool | Use 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 | ||
--ssh | bool | Use 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 | -t | bool | Allocate 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. | |
--user | string | SSH username (default: the instance's spawn:local-username tag, else ec2-user) | ||
--via-ssm | bool | Windows --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 defaultsspawn defaults list โ
List all default launch values
spawn defaults listspawn 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:
| Flag | Short | Type | Default | Description |
|---|---|---|---|---|
--domain | string | DNS zone (default: the instance's spawn:dns-domain, else SPAWN_DNS_DOMAIN / ~/.spawn/config.yaml / SSM, else spore.host) | ||
--endpoint | string | Custom 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:
| Flag | Short | Type | Default | Description |
|---|---|---|---|---|
--yes | -y | bool | Skip the confirmation prompt |
spawn dns list โ
List DNS-enabled spawn instances
spawn dns list [flags]Flags:
| Flag | Short | Type | Default | Description |
|---|---|---|---|---|
--all | -a | bool | Show 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:
| Flag | Short | Type | Default | Description |
|---|---|---|---|---|
--region | string | AWS 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-proxyspawn 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:
| Flag | Short | Type | Default | Description |
|---|---|---|---|---|
--all | bool | Delete the proxies and groups of every VPC in the region | ||
--dry-run | bool | Print what would be terminated and deleted, and change nothing | ||
--vpc | string | The VPC whose proxy and groups to delete (a vpc- ID) | ||
--yes | -y | bool | Do 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:
| Flag | Short | Type | Default | Description |
|---|---|---|---|---|
--all-regions | bool | Show every region enabled in this account | ||
--vpc | string | Show 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:
| Flag | Short | Type | Default | Description |
|---|---|---|---|---|
--keep-old | bool | Leave the old proxy running until it expires on its own | ||
--vpc | string | The VPC whose proxy to upgrade (a vpc- ID; required) | ||
--yes | -y | bool | Do 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:
| Flag | Short | Type | Default | Description |
|---|---|---|---|---|
--cost-limit | float64 | Set 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-id | string | Extend TTL for all instances in job array by ID | ||
--job-array-name | string | Extend TTL for all instances in job array by name | ||
--raise-cost-limit | bool | Raise 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:
# This region, including the control plane
spawn footprint
# Every region enabled in this account
spawn footprint --all-regions
# Machine-readable
spawn footprint -o jsonFlags:
| Flag | Short | Type | Default | Description |
|---|---|---|---|---|
--all-regions | bool | Scan every region enabled in this account (DescribeRegions), not just the configured one | ||
--region | string | AWS region (default: configured region) |
spawn fsx โ
Manage FSx Lustre filesystems: list, show, delete (export via delete --export-first)
spawn fsxspawn fsx delete โ
Delete an FSx Lustre filesystem, optionally exporting to S3 first
spawn fsx delete <filesystem-id> [flags]Flags:
| Flag | Short | Type | Default | Description |
|---|---|---|---|---|
--export-first | bool | Export data to S3 before deleting | ||
--yes | -y | bool | Skip confirmation prompt |
spawn fsx list โ
List all spawn-managed FSx Lustre filesystems across all regions
spawn fsx listspawn 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:
| Flag | Short | Type | Default | Description |
|---|---|---|---|---|
--job-array-id | string | Hibernate all instances in job array by ID | ||
--job-array-name | string | Hibernate 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 imagespawn 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:
| Flag | Short | Type | Default | Description |
|---|---|---|---|---|
--bucket | string | S3 bucket to stage a local ISO in (default: managed spawn-iso-import-<account>-<region>, auto-created) | ||
--execution-role | string | AWSServiceRoleForImageBuilder | IAM execution role name or ARN | |
--image-index | int64 | 1 | 1-based edition index in a multi-edition ISO | |
--infra-config-arn | string | Image Builder infrastructure configuration ARN (optional; self-provisioned if omitted) | ||
--instance-type | string | m6i.large | Build instance type (when self-provisioning infra) | |
--iso | string | Windows 11 ISO: local path or s3://bucket/key.ISO (required) | ||
--keep-iso | bool | Keep the staged ISO (and managed bucket) after the AMI is built; by default they are deleted (only applies with --wait) | ||
--name | string | Image Builder image resource name (required) | ||
--no-secure-boot | bool | Disable Secure Boot on the output AMI | ||
--no-warm | bool | Skip building the warm (fast-boot) AMI; produce only the raw imported base AMI | ||
--region | string | us-east-1 | AWS region for the import build | |
--s3-key | string | S3 object key for the uploaded ISO (default: derived from filename, .ISO) | ||
--security-group-ids | stringSlice | Security groups for the build instance (comma-separated or repeated; when self-provisioning infra) | ||
--subnet-id | string | Subnet for the build instance (when self-provisioning infra) | ||
--version | string | 1.0.0 | Semantic version for the output image (major.minor.patch) | |
--wait-timeout | int | 60 | Max minutes to wait when --wait is set before detaching (the build keeps running) | |
--wait | bool | Wait for the AMI to finish building, then tag and clean up (warm mode implies this) | ||
--warm-instance-type | string | m7i.xlarge | Instance type for the warm-build seed (non-burstable; Windows) | |
--warm-timeout | int | 30 | Safety-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:
| Flag | Short | Type | Default | Description |
|---|---|---|---|---|
--region | string | us-east-1 | AWS 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:
- Interactive wizard (default if no input)
- From truffle JSON via pipe
- 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:
| Flag | Short | Type | Default | Description |
|---|---|---|---|---|
--active-ports | string | TCP 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-processes | string | Process names to monitor, prevents the idle stop while any are running (e.g. 'rsession' for RStudio, 'rsession,jupyter' for multiple) | ||
--allow-cidr | string | CIDR allowed to reach the managed Windows security group (RDP 3389 + SSH 22); default 0.0.0.0/0 | ||
--allow-cost-limit-overrun | bool | Proceed 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-endpoints | bool | With --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 | ||
--ami | string | AMI ID (ami-...); omit or use 'auto' to auto-detect the latest AL2023 | ||
--attach-volume | stringArray | Attach 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-group | bool | true | Automatically create placement group for MPI job arrays (default: true) | |
--az | string | Availability 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-queue | string | Batch job queue file (JSON) for sequential execution | ||
--bootstrap-egress | string | none | With --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) | |
--budget | float64 | Budget limit in dollars for parameter sweeps (0 = no limit) | ||
--capacity-block | bool | The --reservation-id is a Capacity Block for ML (sets MarketType=capacity-block); mutually exclusive with --spot (#216) | ||
--command | string | Command 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-delay | string | 30s | Grace period after completion signal | |
--completion-file | string | /tmp/SPAWN_COMPLETE | File to watch for completion signal | |
--completion-webhook-url | string | On 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-strict | bool | Strict mode: fail on warnings (default: show warnings only) | ||
--config | string | Launch config YAML file (supports plugins: list) | ||
--cost-limit | float64 | Total 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. | ||
--count | int | 1 | Number of instances to launch (job array) | |
--detach | bool | Run sweep orchestration in Lambda (the default for parameter sweeps; without --max-concurrent, min(rows, 10) at a time) | ||
--dns-api-endpoint | string | Lambda 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-domain | string | Register 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-arn | string | ARN 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 | ||
--dns | string | Override DNS name if different from --name (advanced) | ||
--dry-run | bool | Resolve and print the launch configuration without launching anything (no AWS mutation) | ||
--efa-group | string | With --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-interfaces | int | With --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-type | string | efa-only | With --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 | |
--efa | bool | Enable Elastic Fabric Adapter for ultra-low latency MPI (requires supported instance types) | ||
--efs-id | string | EFS filesystem ID to mount (fs-xxx) | ||
--efs-mount-options | string | Custom EFS mount options (overrides profile) | ||
--efs-mount-point | string | /efs | EFS mount point (default: /efs) | |
--efs-profile | string | general | EFS performance profile: general, max-io, max-throughput, burst | |
--egress-proxy-idle | duration | 72h0m0s | With --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-only | bool | Show cost estimate and exit without launching | ||
--fsx-create | bool | Create new FSx Lustre filesystem with S3 backing (requires --fsx-lifecycle) | ||
--fsx-export-path | string | S3 path to export to (e.g., s3://bucket/prefix) | ||
--fsx-id | string | Existing FSx Lustre filesystem ID to mount (fs-xxx) | ||
--fsx-import-path | string | S3 path to import from (e.g., s3://bucket/prefix) | ||
--fsx-lifecycle | string | FSx 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-point | string | /fsx | FSx mount point (default: /fsx) | |
--fsx-recall | string | Recall FSx filesystem by stack name (recreate from S3) | ||
--fsx-s3-bucket | string | S3 bucket for FSx import/export (required with --fsx-create) | ||
--fsx-skip-validate | bool | Skip FSx filesystem validation (for testing) | ||
--fsx-storage-capacity | int32 | 1200 | FSx storage capacity in GB (1200, 2400, or increments of 2400) | |
--fsx-throughput | int32 | 125 | FSx PERSISTENT_2 throughput in MB/s/TiB (125, 250, 500, or 1000; default: 125) | |
--fsx-ttl | string | FSx 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 | ||
--hibernate | bool | Configure the instance for hibernation (encrypted root sized for RAM). Implied by --on-idle hibernate and --on-complete hibernate | ||
--iam-allow-full-access | bool | Permit wildcard :FullAccess --iam-policy templates (s3:/dynamodb:/sqs: on all resources) on the instance role; off by default โ prefer scoped ReadOnly/WriteOnly | ||
--iam-managed-policies | stringSlice | AWS managed policy ARNs | ||
--iam-policy-file | string | Custom IAM policy JSON file | ||
--iam-policy | stringSlice | Service-level policies (e.g., s3:ReadOnly,dynamodb:WriteOnly). Wildcard *:FullAccess templates require --iam-allow-full-access | ||
--iam-role-tags | stringSlice | Tags for IAM role (key=value format) | ||
--iam-role | string | IAM role name (creates if doesn't exist) | ||
--iam-trust-services | stringSlice | [ec2] | Services that can assume role | |
--idle-cpu-threshold | string | CPU 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-timeout | string | Stop 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-names | string | Instance name template (e.g., 'worker-{index}', default: '{job-array-name}-{index}') | ||
--instance-profile | string | Attach 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-type | string | Instance type | ||
--interactive | bool | Force interactive wizard | ||
--job-array-name | string | Job array group name (required if --count > 1) | ||
--keep-on-error | bool | If 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-name | string | SSH key pair name (EC2 KeyName) | ||
--launch-delay | string | 0s | Delay between instance launches (e.g., 5s) | |
--max-concurrent-auto | bool | Derive --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-region | int | Max instances running simultaneously per region (0 = unlimited) | ||
--max-concurrent | int | Max instances running simultaneously. 0 (the default): a detached sweep runs min(rows, 10) at a time, a --no-detach sweep all at once | ||
--metrics-bind | string | With --metrics: the address to listen on, an IP address or localhost (default localhost; 0.0.0.0 for a scraper on another host) | ||
--metrics-path | string | With --metrics: the HTTP path to serve metrics on (default /metrics) | ||
--metrics-port | int | With --metrics: the metrics server's port, 1024-65535 (default 9090) | ||
--metrics | bool | Start 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-viable | int | 1 | Job array: minimum members that must launch for success (default 1; ignored for --mpi) | |
--mode | string | balanced | Distribution mode: balanced (fair share) or opportunistic (prioritize available regions) | |
--mpi-command | string | Command 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-node | int | MPI processes per node (default: vCPU count) | ||
--mpi | bool | Enable MPI cluster setup (requires --count > 1) | ||
--name | string | Name your spore (sets Name tag, DNS, and hostname). Either this or the positional form 'spawn launch <name>'; both are accepted (#499). | ||
--nested-spawn | bool | Give 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-virtualization | bool | Enable nested virtualization (run KVM/Hyper-V inside the instance). Requires a C8i/M8i/R8i instance type. | ||
--nist-800-171 | bool | Enable NIST 800-171 Rev 3 compliance mode | ||
--nist-800-53 | string | Enable NIST 800-53 compliance (low, moderate, high) | ||
--no-detach | bool | Disable auto-detach for parameter sweeps (requires --ttl or --idle-timeout) | ||
--no-dns | bool | Do 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-ip | bool | Launch 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-timeout | bool | Disable automatic timeout (NOT RECOMMENDED: creates zombie risk) | ||
--notify-platform | string | Experimental, needs SPAWN_EXPERIMENTAL_CHAT=1: chat platform for lifecycle notifications: slack (default), teams, or discord | ||
--on-complete | string | Action 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-idle | string | Action 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 | ||
--os | string | Target 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-id | string | Write sweep/instance ID to file for scripting | ||
--param-file | string | Path to parameter sweep file (JSON/YAML/CSV). Not with --params | ||
--params | string | Inline 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-group | string | AWS Placement Group for MPI instances (auto-created if not specified) | ||
--plugin | stringArray | Plugin to install at launch (ref[@version], repeatable) | ||
--pre-stop-timeout | string | Max time to wait for --pre-stop command (default: 5m, spot: 90s; on spot never past the interruption) | ||
--pre-stop | string | Shell command to run on the instance before any lifecycle-triggered stop/terminate (e.g., "aws s3 sync /results s3://bucket/") | ||
--print-config | bool | Alias for --dry-run | ||
--queue-template | string | Queue template name (use 'spawn queue template list' to see options) | ||
--quiet | bool | Minimal output | ||
--region | string | AWS 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-exclude | stringSlice | Exclude these regions (supports wildcards: us-, eu-) | ||
--regions-geographic | stringSlice | Geographic constraints: us, eu, ap, north-america, europe, asia-pacific | ||
--regions-include | stringSlice | Only use these regions (supports wildcards: us-, eu-) | ||
--reservation-id | string | Capacity Reservation / Capacity Block ID to launch into (fs-/cr-...) โ instance must be in the reservation's AZ (#216) | ||
--s3-read | stringArray | Grant 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-write | stringArray | Grant the instance write access to this S3 bucket (repeatable). Pair with --s3-read when the workload both reads inputs and writes results. | ||
--security-group-ids | stringSlice | Security group IDs (comma-separated or repeated) | ||
--session-timeout | string | 30m | Auto-logout idle shells (0 to disable) | |
--skip-mpi-install | bool | Skip MPI installation (use with custom AMIs that have MPI pre-installed) | ||
--skip-region-check | bool | Skip data locality region mismatch warnings | ||
--slack-workspace | string | Experimental, needs SPAWN_EXPERIMENTAL_CHAT=1: Slack workspace ID for lifecycle notifications via spore-bot (e.g. T03NE3GTY) | ||
--spot-max-price | string | Max Spot price | ||
--spot-webhook-url | string | On spot interruption, spored POSTs a fire-once, best-effort notice to this URL within the ~2-min window (off-node consumers; empty = disabled) | ||
--spot | bool | Launch 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-formation | string | Strata formation to activate (e.g. r-research@2024.03) | ||
--strata-profile | string | Path to a Strata profile YAML file | ||
--strata-registry | string | s3://strata-registry | Strata registry S3 URL | |
--subnet-id | string | Subnet ID | ||
--sweep-name | string | Human-readable sweep identifier (auto-generated if empty) | ||
--tag | stringArray | Custom tag key=value on the instance and its created volumes (repeatable). The spawn: prefix is reserved. | ||
--team | string | Team ID: tag instance with spawn:team-id for team-shared access | ||
--template-var | stringToString | Template variables (key=value) | ||
--tracing-exporter | string | With --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-sampling | string | With --tracing: the fraction of traces kept, 0 to 1 (default 0.1) | ||
--tracing | bool | Turn on spored's OpenTelemetry tracing. Spans go to spored's journal (the stdout exporter) | ||
--ttl | string | Auto-terminate after duration (e.g., 8h, 90m, 1d, 2d12h; defaults to 1h idle if not set) | ||
--user-data-file | string | User data file | ||
--user-data | string | User data (@file or inline) | ||
--volume-size | int32 | Root EBS volume size in GiB (0 = use AMI default) | ||
--vpc | string | VPC ID | ||
--wait-for-running | bool | true | Wait until running | |
--wait-for-ssh | bool | Linux: 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-timeout | string | Timeout for --wait (e.g., 2h, 30m, 0=no timeout) | ||
--wait | bool | Wait for a detached parameter sweep to complete (not with --no-detach) | ||
--webhook-correlation | string | Opaque 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-timeout | string | Hard cap on the spot-webhook/completion-webhook POST so it can't eat the reclamation window or delay the completion action (default: 2s) | ||
--yes | -y | bool | Skip 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:
| Flag | Short | Type | Default | Description |
|---|---|---|---|---|
--az | string | Filter by availability zone | ||
--instance-family | string | Filter by instance family (e.g., m7i, t3) | ||
--instance-type | string | Filter by exact instance type (e.g., t3.micro) | ||
--job-array-id | string | Filter by job array ID | ||
--job-array-name | string | Filter by job array name | ||
--region | string | Filter by AWS region (default: all regions) | ||
--regions | -r | stringSlice | Filter by regions (comma-separated, e.g. us-east-1,us-west-2) | |
--state | string | Filter 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-id | string | Filter by parameter sweep ID | ||
--sweep-name | string | Filter by parameter sweep name | ||
--tag | stringArray | Filter 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:
| Flag | Short | Type | Default | Description |
|---|---|---|---|---|
--console | bool | Print the whole serial console dump, not just the command-log block | ||
--lines | int | 100 | Lines to tail from a LIVE instance (the console block is fixed at what spored wrote) | |
--no-cache | bool | Ignore the local cache and re-fetch from AWS | ||
--which | string | command | Which 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 notifyspawn notify deregister โ
Remove a chat bot registration
spawn notify deregister [flags]Flags:
| Flag | Short | Type | Default | Description |
|---|---|---|---|---|
--nickname | string | Nickname to deregister | ||
--platform | string | Chat platform: slack, teams, or discord | ||
--table | string | Override DynamoDB registry table name | ||
--user-id | string | Platform user ID | ||
--workspace-id | string | Platform 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:
| Flag | Short | Type | Default | Description |
|---|---|---|---|---|
--nickname | string | Nickname of the registration to enable/disable | ||
--platform | string | Chat platform: slack, teams, or discord | ||
--table | string | Override DynamoDB registry table name | ||
--user-id | string | Platform user ID | ||
--workspace-id | string | Platform 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:
| Flag | Short | Type | Default | Description |
|---|---|---|---|---|
--nickname | string | Nickname of the registration to enable/disable | ||
--platform | string | Chat platform: slack, teams, or discord | ||
--table | string | Override DynamoDB registry table name | ||
--user-id | string | Platform user ID | ||
--workspace-id | string | Platform workspace ID |
spawn notify list โ
List chat bot registrations for a workspace
spawn notify list [flags]Flags:
| Flag | Short | Type | Default | Description |
|---|---|---|---|---|
--platform | string | Chat platform: slack, teams, or discord | ||
--table | string | Override DynamoDB registry table name | ||
--workspace-id | string | Platform 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:
| Flag | Short | Type | Default | Description |
|---|---|---|---|---|
--allow | stringSlice | Allowed actions (default: start,stop,status,hibernate,url) | ||
--connect-code | string | One-time code from /spore connect (alternative to --user-id) | ||
--external-id | string | STS ExternalId in --role-arn's trust policy (the auto-created role supplies its own) | ||
--instance | string | Instance ID (i-...) or name | ||
--nickname | string | Friendly name for slash commands (default: 'default') | ||
--platform | string | Chat platform: slack, teams, or discord | ||
--repair | bool | Rewrite the trust policy of a spawn-created SpawnBotCrossAccount role that trusts an old bot principal or lacks a per-account ExternalId | ||
--role-arn | string | Cross-account IAM role ARN for this instance's account (created automatically if omitted) | ||
--table | string | Override DynamoDB registry table name | ||
--tag-prefix | string | Tag prefix: spawn or prism (default: auto-detected) | ||
--user-id | string | Platform-native user ID (e.g. Slack U04KZABCD) | ||
--user | string | User email address (resolved to platform user ID) | ||
--workspace-id | string | Platform workspace ID (e.g. Slack T03NE3GTY) |
spawn notify workspace โ
Manage chat-platform workspace registrations
spawn notify workspacespawn 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:
| Flag | Short | Type | Default | Description |
|---|---|---|---|---|
--allowed-channels | stringSlice | Restrict commands to specific channel IDs (e.g. C12345,C67890). Empty = all channels. | ||
--bot-token | string | Bot token (Slack xoxb-..., Teams Azure Bot client secret, or Discord bot token) | ||
--connect-ttl | int | Max /spore connect code lifetime in hours (0 = use platform default, typically 24h). Can only lower the platform default. | ||
--platform | string | Chat platform: slack, teams, or discord | ||
--public-key | string | Discord application public key (Ed25519, hex; required for discord) | ||
--signing-secret | string | Slack app signing secret (required for slack; refused for teams) | ||
--table | string | Override DynamoDB workspaces table name | ||
--webhook-url | string | Channel webhook URL for notifications (Discord channel webhook, or manual Slack incoming webhook) | ||
--workspace-id | string | Platform workspace ID | ||
--workspace-name | string | Human-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:
| Flag | Short | Type | Default | Description |
|---|---|---|---|---|
--dry-run | bool | Preview what would be removed without deleting anything | ||
--platform | string | Chat platform: slack, teams, or discord | ||
--registry-table | string | Override DynamoDB registry table name | ||
--workspace-id | string | Platform workspace ID (required) | ||
--workspaces-table | string | Override DynamoDB workspaces table name | ||
--yes | -y | bool | Skip the confirmation prompt |
spawn notify workspace list โ
List registered workspaces
spawn notify workspace list [flags]Flags:
| Flag | Short | Type | Default | Description |
|---|---|---|---|---|
--platform | string | Chat platform: slack, teams, or discord | ||
--table | string | Override DynamoDB workspaces table name |
spawn notify workspace remove โ
Remove a workspace registration
spawn notify workspace remove [flags]Flags:
| Flag | Short | Type | Default | Description |
|---|---|---|---|---|
--platform | string | Chat platform: slack, teams, or discord | ||
--table | string | Override DynamoDB workspaces table name | ||
--workspace-id | string | Platform workspace ID | ||
--yes | -y | bool | Skip 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:
| Flag | Short | Type | Default | Description |
|---|---|---|---|---|
--external-id | string | ExternalId the role must trust (default: the existing role's, else a new one) | ||
--phone-home-role | string | Portal phone-home Lambda role ARN to trust (or SPORE_PORTAL_PHONE_HOME_ROLE_ARN) | ||
--phone-home-url | string | Portal phone-home Function URL (or SPORE_PORTAL_PHONE_HOME_URL) | ||
--region | string | AWS region to onboard (default: profile/SDK region) | ||
--skip-phone-home | bool | Create the role but don't auto-register with the portal | ||
--spored-role | string | Role 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:
| Flag | Short | Type | Default | Description |
|---|---|---|---|---|
--all-regions | bool | Search every enabled region | ||
--all | bool | Include resources created by other principals (default: only yours) | ||
--region | string | AWS 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 pipelinespawn 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:
| Flag | Short | Type | Default | Description |
|---|---|---|---|---|
--yes | -y | bool | Skip 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:
| Flag | Short | Type | Default | Description |
|---|---|---|---|---|
--output-dir | string | ./results | Output directory for downloaded files | |
--run | string | Run id to collect, as printed at launch (default: the pipeline's latest run) | ||
--stage | string | Download 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:
| Flag | Short | Type | Default | Description |
|---|---|---|---|---|
--simple | bool | Show simplified graph | ||
--stats | bool | Show 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:
| Flag | Short | Type | Default | Description |
|---|---|---|---|---|
--region | string | AWS region (default: from AWS config) | ||
--replace | bool | If the pipeline has a run in flight, cancel it (terminating its instances) and start a new run | ||
--wait-timeout | duration | 24h0m0s | Give up waiting after this long (the pipeline keeps running; --wait then exits non-zero) | |
--wait | bool | Block 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:
| Flag | Short | Type | Default | Description |
|---|---|---|---|---|
--status | string | Filter 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 pluginspawn 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:
| Flag | Short | Type | Default | Description |
|---|---|---|---|---|
--generated-at | string | RFC3339 generation timestamp (default: now) | ||
--output | -o | string | Write index to this file instead of stdout | |
--source | string | spore-host/spore-plugins | owner/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:
| Flag | Short | Type | Default | Description |
|---|---|---|---|---|
--refresh | bool | Bypass 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:
| Flag | Short | Type | Default | Description |
|---|---|---|---|---|
--insecure | bool | Skip 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:
| Flag | Short | Type | Default | Description |
|---|---|---|---|---|
--config | stringArray | Config as key=value (repeatable) | ||
--dry-run | bool | Preview the plan without installing (contacts no instance) | ||
--insecure | bool | Skip signature/checksum verification for official plugin releases (unsafe) | ||
--instance | -i | string | Instance ID or hostname (required) | |
--key | string | Path to SSH private key | ||
--user | string | SSH username for the instance (default: ec2-user) |
spawn plugin list โ
List plugins installed on an instance
spawn plugin list [flags]Flags:
| Flag | Short | Type | Default | Description |
|---|---|---|---|---|
--instance | -i | string | Instance ID or hostname (required) | |
--key | string | Path to SSH private key | ||
--user | string | SSH 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:
| Flag | Short | Type | Default | Description |
|---|---|---|---|---|
--output | -o | string | Write manifest to this file instead of stdout |
spawn plugin remove โ
Remove a plugin from an instance
spawn plugin remove <name> [flags]Flags:
| Flag | Short | Type | Default | Description |
|---|---|---|---|---|
--instance | -i | string | Instance ID or hostname (required) | |
--key | string | Path to SSH private key | ||
--user | string | SSH username for the instance (default: ec2-user) | ||
--yes | -y | bool | Skip the confirmation prompt |
spawn plugin search โ
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:
| Flag | Short | Type | Default | Description |
|---|---|---|---|---|
--refresh | bool | Bypass 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:
| Flag | Short | Type | Default | Description |
|---|---|---|---|---|
--instance | -i | string | Instance ID or hostname (required) | |
--key | string | Path to SSH private key | ||
--user | string | SSH 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:
| Flag | Short | Type | Default | Description |
|---|---|---|---|---|
--strict | bool | Also 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 poolFlags:
| Flag | Short | Type | Default | Description |
|---|---|---|---|---|
--run-id | string | Run 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:
| Flag | Short | Type | Default | Description |
|---|---|---|---|---|
--container | stringArray | Container 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-limit | float64 | Spend 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-timeout | duration | 5m0s | Workers terminate after this long with an empty queue | |
--instance-type | string | Worker instance type (e.g. c7i.large) | ||
--min-viable | int | 1 | Minimum workers that must come up (best-effort: ask N, accept >= this) | |
--s3-read | stringArray | Extra S3 bucket the tasks read inputs from (repeatable) โ beyond the results bucket workers always get | ||
--s3-write | stringArray | Extra S3 bucket the tasks write outputs to (repeatable) โ beyond the results bucket | ||
--spot | bool | Launch workers as Spot instances | ||
--ttl | string | 4h | Per-worker TTL backstop | |
--visibility-timeout | int | 900 | SQS claim window in seconds (must exceed the longest task runtime) | |
--workers | int | Number 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:
| Flag | Short | Type | Default | Description |
|---|---|---|---|---|
--wait | duration | 2m0s | How 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 Rspawn 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:
| Flag | Short | Type | Default | Description |
|---|---|---|---|---|
--spec | string | Path 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 queuespawn 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:
| Flag | Short | Type | Default | Description |
|---|---|---|---|---|
--bucket | string | S3 bucket holding the results (overrides --config; default spawn-results-<region>) | ||
--config | string | Queue config JSON the queue was launched with; its result_s3_bucket is where results actually went | ||
--output-dir | string | . | 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 templatespawn 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:
| Flag | Short | Type | Default | Description |
|---|---|---|---|---|
--output-file | string | Output file (default: stdout) | ||
--var | stringToString | Template 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:
| Flag | Short | Type | Default | Description |
|---|---|---|---|---|
--output-file | string | Output 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 listspawn 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 reaperFlags:
| Flag | Short | Type | Default | Description |
|---|---|---|---|---|
--region | string | AWS region to operate in (default: resolved region) |
spawn reaper arm โ
Let the deployed reaper actually terminate expired instances
spawn reaper arm [flags]Flags:
| Flag | Short | Type | Default | Description |
|---|---|---|---|---|
--yes | bool | Skip 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:
| Flag | Short | Type | Default | Description |
|---|---|---|---|---|
--artifact | string | Use this Lambda zip instead of downloading a release asset (local path or URL) | ||
--bucket | string | S3 bucket in THIS account to hold the artifact (default: spawn-reaper-artifacts-<account>-<region>) | ||
--elastic-ips | string | Orphaned 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-buckets | string | Empty spawn-staging/spawn-results bucket sweep, REAPER_EMPTY_BUCKETS: off|report|reap (default: keep; the reaper's default is report) | ||
--instance-roles | string | Unused per-task spawn-instance-* IAM role sweep, REAPER_INSTANCE_ROLES: off|report|reap (default: keep; the reaper's default is report) | ||
--launch-configs | string | Unreferenced 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-days | int32 | Days 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-age | string | Max-age ceiling, REAPER_MAX_AGE, e.g. 336h or 14d (default: keep; the reaper's default is 7d) | ||
--net-resources | string | Network-resource sweep, REAPER_NET_RESOURCES: off|report|reap (default: keep; the reaper's default is report) | ||
--notify-url | string | URL the reaper POSTs notifications to, REAPER_NOTIFY_URL; never printed. "-" reads it from stdin (default: keep) | ||
--pool-queues | string | Abandoned pool SQS queue and staged-spec sweep, REAPER_POOL_QUEUES: off|report|reap (default: keep; the reaper's default is report) | ||
--regions | string | Comma-separated regions for the reaper to scan (default: keep the existing reaper's; the deploy region for a new one) | ||
--schedule-params | string | Orphaned 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) | ||
--schedule | string | EventBridge schedule expression (default: keep the existing reaper's; rate(10 minutes) for a new one) | ||
--spot-requests | string | Orphaned Spot-request sweep, REAPER_SPOT_REQUESTS: off|report|reap (default: keep; the reaper's default is report) | ||
--ttl-grace | string | How 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) | ||
--version | string | spawn 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 statusspawn 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:
| Flag | Short | Type | Default | Description |
|---|---|---|---|---|
--bucket | string | Artifact bucket to remove (default: the one recorded on the function at deploy time, else spawn-reaper-artifacts-<account>-<region>) | ||
--force-artifacts | bool | Remove the artifact bucket even if it is not tagged spawn:managed=true (for buckets created before the tag existed) | ||
--if-idle-for | duration | 0s | Only 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-artifacts | bool | Leave the artifact bucket in place (it is removed by default) | ||
--keep-logs | bool | Leave 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:
| Flag | Short | Type | Default | Description |
|---|---|---|---|---|
--all-regions | bool | Search every enabled region | ||
--all | bool | Include resources created by other principals (default: only yours) | ||
--region | string | AWS region (default: current region from AWS config) |
spawn results โ
Inspect task results in S3
spawn resultsspawn 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:
# 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 --applyFlags:
| Flag | Short | Type | Default | Description |
|---|---|---|---|---|
--apply | bool | Write the change (default: dry run) | ||
--bucket | string | Bucket to work on (default: spawn-results-<account>-<region>) | ||
--region | string | Region for the default bucket (default: configured region) | ||
--remove | bool | Take 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:
# 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:
| Flag | Short | Type | Default | Description |
|---|---|---|---|---|
--off | bool | Set 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:
# 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 jsonFlags:
| Flag | Short | Type | Default | Description |
|---|---|---|---|---|
--bucket | string | Bucket to report on (default: spawn-results-<account>-<region>) | ||
--objects | bool | List every object with where tiering would put it | ||
--prefix | string | Only objects under this key prefix | ||
--region | string | Region 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 schedulespawn 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:
| Flag | Short | Type | Default | Description |
|---|---|---|---|---|
--yes | -y | bool | Skip 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:
| Flag | Short | Type | Default | Description |
|---|---|---|---|---|
--at | string | One-time execution time (ISO 8601 format) | ||
--cron | string | Cron expression for recurring execution | ||
--end-after | string | Stop executing after this time (ISO 8601 format) | ||
--max-executions | int | Maximum number of executions (0 = unlimited) | ||
--name | string | Friendly name for this schedule | ||
--region | string | us-east-1 | AWS region the sweep's instances launch in (the schedule itself always runs from us-east-1) | |
--timezone | string | UTC | IANA 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:
| Flag | Short | Type | Default | Description |
|---|---|---|---|---|
--status | string | Filter 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:
| Flag | Short | Type | Default | Description |
|---|---|---|---|---|
--addr-args | string | --addr 127.0.0.1:0 | Arguments telling the service where to listen; pass an empty string to append nothing | |
--ami | string | AMI to launch (default: the recommended AMI for the instance type) | ||
--boot-timeout | duration | 0s | How long to wait for the readiness line (default 2m; raise it for a service that does heavy work before serving) | |
--dry-run | bool | Print the plan without launching anything | ||
--host | string | Run on an instance that is already running (name or instance ID); it is not terminated afterwards | ||
--idle-timeout | string | Terminate the instance after this much idleness (e.g. 30m) | ||
--instance-type | string | EC2 instance type to launch (required unless --host is given) | ||
--key | string | SSH private key (default: the instance's launch key) | ||
--local-port | int | Local port for the tunnel (default: a free port) | ||
--name | string | Name tag for the instance (default: spawn-service) | ||
--open | bool | Open the service URL in a browser once it is ready | ||
--remote-path | string | Where --upload lands on the instance (default: /tmp/spawn-service-bin) | ||
--security-group-ids | stringSlice | Security groups for the instance | ||
--spot | bool | Launch as a spot instance (cheaper; an interruption ends the service) | ||
--subnet-id | string | Subnet to launch into | ||
--ttl | string | Terminate the instance after this long (e.g. 2h). With no --ttl and no --idle-timeout, a 1h idle timeout is applied | ||
--upload | string | Local file to copy to the instance before starting (usually the service binary) | ||
--user | string | SSH 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 slurmspawn 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:
| Flag | Short | Type | Default | Description |
|---|---|---|---|---|
--output-file | string | Output 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:
| Flag | Short | Type | Default | Description |
|---|---|---|---|---|
--region | string | Region 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:
| Flag | Short | Type | Default | Description |
|---|---|---|---|---|
--region | string | Region to price the estimate in (default: #SPAWN --region, else your AWS config region) | ||
--yes | -y | bool | Skip 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 snapshotspawn 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:
| Flag | Short | Type | Default | Description |
|---|---|---|---|---|
--description | string | Snapshot description | ||
--encrypted | bool | Create an encrypted snapshot | ||
--from | string | Source: a directory, a .tar/.tar.gz/.tgz, or a raw disk image โ local path or s3://bucket/key (required) | ||
--kms-key | string | Customer-managed KMS key ARN for encryption (implies --encrypted) | ||
--name | string | Name tag for the snapshot (also sets spawn:snapshot-name) | ||
--region | string | AWS region (default: the configured region) | ||
--size | int64 | Volume size in GiB the snapshot is built for; the image must fit (required) | ||
--tag | stringArray | Custom tag key=value to set on the snapshot (repeatable). Merged with the spawn:* baseline; cannot override a spawn: tag. | ||
--temp-dir | string | Directory 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:
| Flag | Short | Type | Default | Description |
|---|---|---|---|---|
--rw | bool | Mount 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:
| Flag | Short | Type | Default | Description |
|---|---|---|---|---|
--job-array-id | string | Start all instances in job array by ID | ||
--job-array-name | string | Start 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:
| Flag | Short | Type | Default | Description |
|---|---|---|---|---|
--check-complete | bool | Check 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:
| Flag | Short | Type | Default | Description |
|---|---|---|---|---|
--job-array-id | string | Stop all instances in job array by ID | ||
--job-array-name | string | Stop all instances in job array by name | ||
--yes | -y | bool | Skip 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 sweepspawn sweep cancel โ
Cancel a running parameter sweep and terminate its instances
spawn sweep cancel <sweep-id> [flags]Flags:
| Flag | Short | Type | Default | Description |
|---|---|---|---|---|
--yes | -y | bool | Skip the confirmation prompt |
spawn sweep collect โ
Download and aggregate results from a completed sweep
spawn sweep collect <sweep-id> [flags]Flags:
| Flag | Short | Type | Default | Description |
|---|---|---|---|---|
--best | int | Show only top N results by metric (0 = all) | ||
--format | string | json | Output format: json, csv, jsonl | |
--metric | string | Metric to rank results by (e.g. accuracy, loss) | ||
--output-file | -f | string | results.json | Output file path |
--regions | -r | stringSlice | Regions to collect from (comma-separated or repeated; default: all) | |
--s3-prefix | string | Custom S3 prefix for results (default: auto-detect) |
spawn sweep list โ
List parameter sweeps
spawn sweep list [flags]Flags:
| Flag | Short | Type | Default | Description |
|---|---|---|---|---|
--last | int | 20 | Show last N sweeps | |
--region | string | Filter by region | ||
--since | string | Show sweeps created after date (YYYY-MM-DD) | ||
--status | string | Filter by status (RUNNING, COMPLETED, FAILED, CANCELLED) |
spawn sweep resume โ
Resume an interrupted parameter sweep from checkpoint
spawn sweep resume <sweep-id> [flags]Flags:
| Flag | Short | Type | Default | Description |
|---|---|---|---|---|
--allow-missing-endpoints | bool | With --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-url | string | The 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-limit | float64 | Cost 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 | ||
--detach | bool | Resume 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-timeout | string | Idle 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-error | bool | Keep 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-auto | bool | Re-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-concurrent | int | Override max concurrent instances (0 = use original) | ||
--spot-webhook-url | string | The 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 | ||
--ttl | string | Time 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-data | string | The 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-correlation | string | The 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 setupspawn sweep status โ
Show parameter sweep status and progress
spawn sweep status <sweep-id> [flags]Flags:
| Flag | Short | Type | Default | Description |
|---|---|---|---|---|
--check-complete | bool | Exit 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:
| Flag | Short | Type | Default | Description |
|---|---|---|---|---|
--force | bool | Delete 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 taskspawn 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:
| Flag | Short | Type | Default | Description |
|---|---|---|---|---|
--ami | string | Pin a specific AMI (overrides auto-selection and placement.ami); empty = auto-select from the sized instance type (GPU DLAMI for GPU families) | ||
--dry-run | bool | Size and preview the task without launching | ||
--poll-interval | duration | 15s | How often to poll for completion when --wait is set | |
--region | string | Region to size against (default: the configured AWS region) | ||
--spec | string | Path to a TaskSpec JSON file (required) | ||
--wait | bool | Block 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:
| Flag | Short | Type | Default | Description |
|---|---|---|---|---|
--check-complete | bool | Exit 0=completed, 1=failed, 2=running, 3=error instead of printing | ||
--region | string | Region the task ran in (default: the configured AWS region) | ||
--results-prefix | string | s3://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 teamspawn 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:
| Flag | Short | Type | Default | Description |
|---|---|---|---|---|
--description | string | Team description | ||
--name | string | Team name (required) |
spawn team delete โ
Delete a team and all memberships (owner only)
spawn team delete <team_id> [flags]Flags:
| Flag | Short | Type | Default | Description |
|---|---|---|---|---|
--yes | -y | bool | Skip the confirmation prompt |
spawn team list โ
List teams you own or belong to
spawn team listspawn team remove โ
Remove a member from a team (owner only)
spawn team remove <team_id> <iam_arn> [flags]Flags:
| Flag | Short | Type | Default | Description |
|---|---|---|---|---|
--yes | -y | bool | Skip 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:
| Flag | Short | Type | Default | Description |
|---|---|---|---|---|
--job-array-id | string | Terminate all instances in job array by ID | ||
--job-array-name | string | Terminate all instances in job array by name | ||
--yes | -y | bool | Skip 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:
| Flag | Short | Type | Default | Description |
|---|---|---|---|---|
--allow-downgrade | bool | Allow a downgrade (target older than the running version) | ||
--timeout | duration | 5m0s | How long to wait for the on-instance upgrade to complete | |
--version | string | Target spored version (e.g. 0.64.0); default: this spawn's version (latest release for a dev build) | ||
--yes | -y | bool | Skip 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:
| Flag | Short | Type | Default | Description |
|---|---|---|---|---|
--infrastructure | bool | Validate infrastructure resources (DynamoDB, S3, Lambda) | ||
--instance-id | string | Specific instance ID to validate | ||
--nist-800-171 | bool | Validate NIST 800-171 Rev 3 compliance | ||
--nist-800-53 | string | Validate NIST 800-53 compliance at a baseline: low, moderate, high (default low) | ||
--region | string | AWS region to validate (default: all regions) |
spawn version โ
Display version, build date, and git commit information for spawn.
spawn version