Slack Setup โ
Connecting spore.host to Slack gives you /spore commands in any channel and direct message notifications when your instances change state โ useful whenever you're away from the terminal.
What you'll get โ
Slash commands โ type these in any Slack channel:
/spore list โ all your registered instances
/spore status rstudio โ current state, type, URL, TTL countdown
/spore start rstudio โ start a stopped instance
/spore stop rstudio โ stop a running instance
/spore extend rstudio 4h โ extend the auto-terminate deadline
/spore hibernate rstudio โ hibernate (save RAM state, stop billing)
/spore connect โ generate a one-time code for a collaborator
/spore notify rstudio โ subscribe to DM notifications for this instance
/spore help โ command referenceDirect message notifications for lifecycle events:
- โฑ๏ธ rstudio terminates in 5 minutes
- โ bert-finetune has completed
- ๐ค analysis has hibernated โ idle timeout reached
- โ ๏ธ training received a Spot interruption notice
Step 1: Create a Slack app โ
- Go to api.slack.com/apps and click Create New App โ From scratch
- Name it
spore-bot(or whatever you prefer) and pick your workspace - Under OAuth & Permissions โ Bot Token Scopes, add:
commandschat:writeusers:readusers:read.emailincoming-webhook
- Under Slash Commands, create a new command:
- Command:
/spore - Request URL:
https://awdzf7fbbsvqcrnrzusqjsuybm0iiyvf.lambda-url.us-east-1.on.aws/slack - Short Description:
Control your spore.host instances
- Command:
- Under Settings โ Basic Information, enable Token Rotation under App Credentials
- Install the app to your workspace โ Slack will ask which channel to post notifications to
Step 2: Connect your workspace โ
After installing the app, you can either use the OAuth flow (recommended) or register manually.
OAuth flow (recommended) โ
Click Add to Slack and authorize the app. The Lambda automatically stores your bot token and signing secret.
TIP
Your "Add to Slack" URL is:
https://awdzf7fbbsvqcrnrzusqjsuybm0iiyvf.lambda-url.us-east-1.on.aws/spore/oauthManual registration โ
spawn notify workspace-add \
--platform slack \
--workspace-id T03NE3GTY \
--workspace-name "My Workspace" \
--bot-token xoxb-... \
--signing-secret abc123...Your workspace ID appears in your Slack URL: https://app.slack.com/client/T03NE3GTY/...
Step 3: Register an instance โ
Once the workspace is connected, register your instances so spore-bot can find them:
spawn notify register \
--platform slack \
--user you@university.edu \
--workspace-id T03NE3GTY \
--instance i-0a1b2c3d4e5f \
--nickname rstudio \
--allow start,stop,status,hibernate,url
spawn notify enable \
--platform slack \
--user you@university.edu \
--workspace-id T03NE3GTY \
--nickname rstudioThe --nickname is what you'll use in Slack commands (/spore status rstudio). The --allow flag controls which operations this user can perform.
Step 4: Enable notifications at launch โ
Set the --slack-workspace flag when launching to enable DM notifications:
spawn launch \
--name rstudio \
--instance-type r6i.2xlarge \
--ttl 8h \
--slack-workspace T03NE3GTYOr save it as a default so you never have to type it:
spawn defaults set slack-workspace T03NE3GTYAdding collaborators โ
Give a collaborator access to an instance without giving them AWS credentials. They can start, stop, and check status entirely from Slack.
# Register a collaborator by email
spawn notify register \
--platform slack \
--user collaborator@partner.edu \
--workspace-id T03NE3GTY \
--instance i-0a1b2c3d4e5f \
--nickname rstudio \
--allow status,start,stop
spawn notify enable \
--platform slack \
--user collaborator@partner.edu \
--workspace-id T03NE3GTY \
--nickname rstudioAlternatively, generate a one-time connect code that the collaborator uses themselves:
/spore connect # generates a code like SPORE-XXXXXXShare the code with the collaborator. They run:
spawn notify register --connect-code SPORE-XXXXXX --nickname rstudioNotification-only subscriptions โ
If a collaborator wants DM notifications but shouldn't control the instance:
/spore notify rstudioThis subscribes them to all lifecycle notifications for rstudio without granting start/stop access.
To unsubscribe: /spore unnotify rstudio
Troubleshooting โ
Commands return "workspace not found" โ check that the signing secret in your Slack app matches what was registered. Signing secrets are regenerated if you change your app's scopes. Re-register with the new secret:
spawn notify workspace-add --platform slack --workspace-id T0... --signing-secret <new-secret>Not receiving DM notifications โ make sure the instance was launched with --slack-workspace and that you've run /spore notify <nickname> for your user.