Summary
spored monitors instance lifecycle but has no way to notify users when a workload finishes. Users who close their laptops after launching a job have no way to know when it completes other than polling spawn status.
Use cases
- Job completes — user touches
/tmp/SPAWN_COMPLETE, spored executes --on-complete stop/terminate, then sends a notification
- TTL fires — instance terminates due to deadline; notification includes job name, final status, and any
--pre-stop output
- Idle timeout — instance stops due to inactivity (possible crash/early completion); notification warns user to check logs
Proposed flags
spawn launch my-job \
--notify email:user@example.com \
--notify webhook:https://hooks.slack.com/... \
--ttl 4h --on-complete stop
Or a global config:
spawn config set notify email:user@example.com
Implementation options
- SNS — spored creates/reuses an SNS topic, subscribes the endpoint, publishes on state change. Simple, AWS-native, works with email/SMS/webhook.
- Direct email via SES — spored sends email directly via SES when available.
- Webhook — spored POSTs a JSON payload to the configured URL on completion.
The SNS approach is cleanest since it composes with EventBridge for more complex routing.
Message format
Should be human-readable, not raw JSON:
BuckAI job "my-job" completed on i-0abc123def456
Status: stopped (SPAWN_COMPLETE signal received)
Runtime: 2h 34m
Instance: r7i.4xlarge in us-east-2
To check outputs:
spawn connect my-job
Context
Discovered while building Tutorial 01 (SageMaker jobs) for BuckAI Observatory. We implemented a workaround using EventBridge + SNS from outside spawn, but it only works for SageMaker-specific events. For EC2 workloads (Tutorials 02–04), users must poll manually. Native spored support would make this first-class for all workload types.
Migrated from spore-host/spore-host#346 — spawn issues belong on this repo.
Summary
spored monitors instance lifecycle but has no way to notify users when a workload finishes. Users who close their laptops after launching a job have no way to know when it completes other than polling
spawn status.Use cases
/tmp/SPAWN_COMPLETE, spored executes--on-complete stop/terminate, then sends a notification--pre-stopoutputProposed flags
spawn launch my-job \ --notify email:user@example.com \ --notify webhook:https://hooks.slack.com/... \ --ttl 4h --on-complete stopOr a global config:
spawn config set notify email:user@example.comImplementation options
The SNS approach is cleanest since it composes with EventBridge for more complex routing.
Message format
Should be human-readable, not raw JSON:
Context
Discovered while building Tutorial 01 (SageMaker jobs) for BuckAI Observatory. We implemented a workaround using EventBridge + SNS from outside spawn, but it only works for SageMaker-specific events. For EC2 workloads (Tutorials 02–04), users must poll manually. Native spored support would make this first-class for all workload types.
Migrated from spore-host/spore-host#346 — spawn issues belong on this repo.