Skip to content

Event schemas ​

spored emits a lifecycle event when something significant happens to an instance (TTL warning, completion, Spot interruption, …). With chat notifications configured, events are delivered as an HTTP POST to the notification endpoint (spawn:notify-url), which routes them to Slack, Teams or Discord. That chat delivery is experimental and not part of 1.0, and the hosted spore-bot is decommissioned, so it needs a self-hosted spore-bot. 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 how to receive events, 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 (the default), teams or discord, from spawn:notify-platform.
workspace_idstringyesTarget workspace (Slack workspace, Teams tenant or Discord guild) 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).
original_instance_idstringnoOnly on spot_replacement_retired: the instance the Spot replacement was launched for, whose registered users receive the event.
pkcs7stringnoThe instance's PKCS#7-signed EC2 identity document, from IMDS. (instance_identity_document / instance_identity_signature exist in the schema but spored doesn't fill them.)
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 (experimental) ​

Beyond the routed Slack/Teams DMs, you can post events to a shared Slack channel webhook. Set it with spawn notify workspace add --webhook-url https://hooks.slack.com/... (with the workspace's bot token and signing secret, since workspace add replaces the whole record), or have it captured automatically during the Add-to-Slack OAuth flow. Discord always delivers to its channel webhook, set the same way. 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 pkcs7 field carries AWS's signed EC2 instance identity, which a receiver of your own can verify to confirm the event came from the instance it names. spore-bot does not verify it. Its control is registration: it sends DMs (and SMS) only for an instance registered in the target workspace, and otherwise posts to the workspace's channel webhook only.