Skip to content

Commit 330c8ef

Browse files
committed
Document snapshot auto-load on start in README
1 parent 0f41c0e commit 330c8ef

1 file changed

Lines changed: 21 additions & 1 deletion

File tree

README.md

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ Running `lstk` will automatically handle configuration setup and start LocalStac
4545
- **Interactive TUI** — a Bubble Tea-powered terminal UI shown in an interactive terminal for commands like `start`, `login`, `status`, etc.
4646
- **Plain output** for CI/CD and scripting (auto-detected in non-interactive environments or forced with `--non-interactive`)
4747
- **Log streaming** — tail emulator logs in real-time with `--follow`; use `--verbose` to show all logs without filtering
48-
- **Snapshots** — save, load, and remove emulator state as local files or named cloud snapshots (`pod:` prefix)
48+
- **Snapshots** — save, load, and remove emulator state as local files or named cloud snapshots (`pod:` prefix), and auto-load one on start
4949
- **Browser-based login** — authenticate via browser and store credentials securely in the system keyring
5050
- **AWS CLI profile** — optionally configure a `localstack` profile in `~/.aws/` after start
5151
- **Terraform integration** — proxy Terraform commands to LocalStack with automatic AWS provider endpoint configuration
@@ -134,6 +134,7 @@ tag = "latest" # Docker image tag, e.g. "latest", "2026.03"
134134
port = "4566" # Host port the emulator will be accessible on
135135
# volume = "" # Host directory for persistent state (default: OS cache dir)
136136
# env = [] # Named environment profiles to apply (see [env.*] sections below)
137+
# snapshot = "pod:my-baseline" # Snapshot REF auto-loaded on start (AWS only); see Snapshots below
137138
```
138139

139140
**Fields:**
@@ -142,6 +143,7 @@ port = "4566" # Host port the emulator will be accessible on
142143
- `port`: port LocalStack listens on (default `4566`)
143144
- `volume`: (optional) host directory for persistent emulator state (default: OS cache dir)
144145
- `env`: (optional) list of named environment variable groups to inject into the container (see below)
146+
- `snapshot`: (optional) snapshot REF auto-loaded after the emulator starts on a fresh run — a local file path or a `pod:` cloud snapshot (see [Snapshots](#snapshots))
145147

146148
### Passing environment variables to the container
147149

@@ -336,6 +338,24 @@ lstk snapshot remove pod:my-baseline --force # skip the prompt (required in non
336338

337339
`lstk snapshot load` supports merge strategies via `--merge` (`account-region-merge` (default), `overwrite`, `service-merge`) to control how snapshot state combines with running state.
338340

341+
### Auto-load on start
342+
343+
The AWS emulator can automatically load a snapshot whenever it starts. Set the `snapshot` field on its `[[containers]]` block to any snapshot reference — a local file or a `pod:` cloud snapshot:
344+
345+
```toml
346+
[[containers]]
347+
type = "aws"
348+
port = "4566"
349+
snapshot = "pod:my-baseline"
350+
```
351+
352+
Override or disable it for a single run without editing the config:
353+
354+
```bash
355+
lstk start --snapshot pod:other-baseline # load a different snapshot this run
356+
lstk start --no-snapshot # skip auto-loading this run
357+
```
358+
339359
## Reporting bugs
340360

341361
Feedback is welcome! Use the repository issue tracker for bug reports or feature requests.

0 commit comments

Comments
 (0)