Skip to content

Event schemas โ€‹

spored emits a lifecycle event when something significant happens to an instance (TTL warning, completion, Spot interruption, โ€ฆ). Events are delivered as an HTTP POST to the notification endpoint (spawn:notify-url), which routes them to Slack/Teams. This page documents the payload shape so you can build automation on top of it.

For when each event fires and its human-readable message, see Lifecycle Events. For enabling delivery to Slack or a channel webhook, see Lifecycle Notifications.

Notification payload โ€‹

Each event is a JSON object with these fields:

FieldTypeAlways presentDescription
event_typestringyesThe event, e.g. ttl_warning, completion, spot_interrupt. See the event type list.
instance_namestringyesThe instance nickname (or ID if unnamed).
instance_idstringyesThe EC2 instance ID.
regionstringyesAWS region of the instance.
platformstringyesDelivery platform: slack or teams.
workspace_idstringyesTarget Slack/Teams workspace for routing.
commandstringnoSlash-command app to route to (e.g. /spore) โ€” disambiguates multiple registered apps.
dns_namestringnoThe instance's spore.host FQDN, when DNS registration is enabled.
detailstringnoFree-text detail for the event (e.g. completion status/message).
instance_identity_document / instance_identity_signature / pkcs7stringnoAWS instance identity attestation โ€” proves the event genuinely originates from the named instance.
json
{
  "event_type": "completion",
  "instance_name": "bert-finetune",
  "instance_id": "i-0abc123def456xyz",
  "region": "us-east-1",
  "platform": "slack",
  "workspace_id": "T03ABCDEF",
  "command": "/spore",
  "dns_name": "bert-finetune.5k0zfnmq.spore.host",
  "detail": "1000 parameter combinations done"
}

Fire-and-forget delivery

Notifications are sent fire-and-forget: a slow or unavailable endpoint never delays or cancels the underlying lifecycle action. Don't rely on a notification being received as a precondition for a stop/terminate having happened.

Channel webhooks โ€‹

Beyond the routed Slack/Teams DMs, you can post events to a shared Slack channel webhook โ€” set it with spawn notify --webhook-url https://hooks.slack.com/... (or captured automatically during the Add-to-Slack OAuth flow). All events for any instance in that workspace post to the channel. Today there is no per-event filter; all events route to all subscribers. See Lifecycle Notifications.

Verifying event authenticity โ€‹

When present, the instance_identity_document + instance_identity_signature (and pkcs7) fields carry AWS's signed EC2 instance identity, letting the receiver confirm the event really came from the instance it names rather than a spoofed caller. The hosted spore-bot Lambda verifies these before acting.