Your First Instance โ
A complete walkthrough from a fresh install to a running EC2 instance and back. Allow 15โ20 minutes.
What you'll accomplish โ
- spawn and truffle installed and working
- AWS credentials verified
- An EC2 instance running in AWS
- An active SSH connection to that instance
- The instance terminated when you're done
Prerequisites โ
- An AWS account (a small instance costs a few cents for this walkthrough)
- macOS, Linux, or Windows with WSL2
- Basic comfort with the command line
1. Install โ
brew install spore-host/tap/truffle
brew install spore-host/tap/spawnVerify:
truffle --version
spawn --versionIf you're not on macOS or need a different install method, see the Installation guide.
2. Check your AWS credentials โ
aws sts get-caller-identityExpected output:
{
"UserId": "AIDAIOSFODNN7EXAMPLE",
"Account": "123456789012",
"Arn": "arn:aws:iam::123456789012:user/yourname"
}If this fails, sign in with aws login (AWS CLI v2.32.0+; static aws configure keys also work). spore.host uses the same credentials as the AWS CLI โ nothing extra to configure. See AWS Authentication for profiles and how auth relates to permissions.
3. Find a cheap instance โ
Before launching, see what's available and what it costs:
truffle find "t3 medium" --region us-east-1You'll see a table with vCPUs, memory, and on-demand price. For this walkthrough we'll use a t3.micro โ cheap, and marked Free Tier eligible in many accounts (eligibility and credits vary by account age/plan, so check the price Truffle shows before launching).
4. Launch โ
spawn launch \
--name my-first-instance \
--instance-type t3.micro \
--ttl 1hAfter about 60โ90 seconds:
โ Instance i-0a1b2c3d4e5f running
โ my-first-instance.abc123.spore.host
โ Connect: spawn connect my-first-instance
โ Auto-terminates in 1hspawn automatically found the latest Amazon Linux 2023 AMI, imported your existing SSH public key (or generated a managed one if you had none), created a Linux user matching your local login, configured networking, and installed spored on the instance.
5. Connect โ
spawn connect my-first-instanceThis logs you in as your own username (the Linux user spawn created to match your local login), using the key it imported โ you don't need to know the address, key path, or username. Raw ssh <you>@<public-ip> works too if you prefer.
TIP
If you get "Connection refused", the instance is still booting. Wait 30 seconds and try again.
Once connected, confirm spored is running:
sudo systemctl status spored6. Check status from your laptop โ
In a second terminal:
spawn status my-first-instanceThis shows state, IP, type, uptime, and time remaining before auto-termination.
Verify lifecycle protection โ
Before you rely on auto-termination, confirm the instance is actually protecting itself. Two quick checks:
spawn status my-first-instance # from your laptopThe output shows time remaining before auto-termination โ if you see a TTL countdown, spawn tagged the instance correctly and the deadline is live. On the instance itself:
sudo systemctl status spored # over SSHactive (running) means the daemon that enforces the deadline is up. spored reads its rules from the instance's EC2 tags every minute, so the TTL holds even if you close your laptop.
For what happens if any of this fails โ a missing instance profile, a crashed daemon, changed tags โ and the out-of-band backstop that catches it, see Costs & safety guarantees.
Clean up โ
When you're done, permanently terminate it (destroys the instance and its EBS volume):
spawn terminate my-first-instance # confirms first; add -y to skipOr spawn stop my-first-instance to keep the EBS volume and resume later (the volume still bills until you terminate) โ or just leave it, since it auto-terminates at the 1-hour TTL you set with --ttl 1h. (TTL is a hard deadline that terminates; idle timeout is a separate, opt-in setting that stops.)
What just happened โ
spored was installed automatically on the instance. It runs in the background, enforces the TTL, and would detect idle activity if configured. This is the core spore.host contract: every instance knows when to stop.
Next steps โ
- Worked transcripts โ complete terminal output for this flow, including a blocked preflight
- GPU Training Jobs โ launch a GPU instance for a real workload
- Slack Setup โ get DM notifications when your instances change state
- spawn launch reference โ every flag explained