You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- **AWS page**: `snapshot` content inlined natively (it's no longer shared with anything, so the component was folded back in and deleted) — kept full Cloud Pods/S3/local support, dropped the inaccurate "also works experimentally on Snowflake/Azure" note.
- **Azure page**: removed `snapshot`/`reset` entirely, added a short note pointing to `--persist` as the only state-retention option, and fixed the Introduction paragraph, which previously claimed Cloud Pod support.
- **Snowflake page**: replaced the shared component with a native `snapshot` section scoped to local files only — no `pod:` refs, no S3 remotes, no `list`/`remove`/`show` (all Cloud-Pod-only) — kept the "experimental" warning since that's specifically about local save/load, and fixed its Introduction paragraph too.
- Annotated the global `--snapshot`/`--no-snapshot` flags as AWS-only in `GlobalOptionsAndOutput.mdx` for consistency.
Copy file name to clipboardExpand all lines: src/components/lstk/GlobalOptionsAndOutput.mdx
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,8 +8,8 @@ These options are available for all commands:
8
8
|`--non-interactive`| Disable the interactive TUI, use plain output |
9
9
|`--json`| Emit a single machine-readable JSON envelope on stdout instead of human-oriented output. Supported by `stop`, `reset`, and `update`; any other command rejects it. See [Structured output](#structured-output). |
10
10
|`--persist`| Persist emulator state across restarts (on `start`/bare `lstk` and `restart`) |
11
-
|`--snapshot <REF>`| Snapshot REF to auto-load after start (on `start`/bare `lstk`; overrides config for one run) |
12
-
|`--no-snapshot`| Skip auto-loading the configured snapshot (on `start`/bare `lstk`)|
11
+
|`--snapshot <REF>`| Snapshot REF to auto-load after start (on `start`/bare `lstk`; overrides config for one run). AWS emulator only.|
12
+
|`--no-snapshot`| Skip auto-loading the configured snapshot (on `start`/bare `lstk`). AWS emulator only.|
@@ -151,7 +150,163 @@ Like `lstk aws`, the `terraform`, `cdk`, and `sam` proxies do not start the emul
151
150
Each requires the corresponding third-party CLI to be installed and on your `PATH`.
152
151
:::
153
152
154
-
<SnapshotCommands />
153
+
### `snapshot`
154
+
155
+
Manage emulator snapshots.
156
+
A snapshot captures the running AWS emulator's state, either as a local file on disk, as a Cloud Pod on the LocalStack platform, or in your own S3 bucket.
157
+
The `snapshot` command groups five subcommands — `save`, `load`, `list`, `remove`, and `show`. The first two are also exposed as the top-level aliases `lstk save` and `lstk load`.
158
+
159
+
:::note
160
+
Cloud Pods and S3 remotes are **AWS-only**. Snapshots are not currently supported for the Snowflake or Azure emulators through `lstk`.
161
+
`reset` is also **AWS-only** and errors out with `reset is only supported for the AWS emulator` otherwise.
162
+
:::
163
+
164
+
#### `snapshot save`
165
+
166
+
Save a snapshot of the running emulator's state.
167
+
The emulator must already be running; this command does **not** auto-start it.
168
+
169
+
```bash
170
+
# Auto-named snapshot file in the current directory
171
+
lstk snapshot save
172
+
173
+
# Save to a specific local path
174
+
lstk snapshot save ./my-snapshot
175
+
176
+
# Save to a Cloud Pod on the LocalStack platform (requires auth)
177
+
lstk snapshot save pod:my-baseline
178
+
179
+
# Save to your own S3 bucket (pod name is auto-generated if omitted)
180
+
lstk snapshot save my-pod s3://my-bucket/prefix
181
+
```
182
+
183
+
The optional `[destination]` argument takes one of these forms:
| (omitted) | Auto-generates a timestamped snapshot file in the current directory (`./snapshot-<timestamp>-<hex>.snapshot`). |
188
+
| local path | Writes a snapshot archive to that path. The `.snapshot` extension is forced. |
189
+
|`pod:<name>`| Saves a Cloud Pod to the LocalStack platform. Requires authentication. |
190
+
|`<pod-name> s3://bucket/prefix`| Saves to your own S3 bucket. The pod name is a separate positional (auto-generated when omitted). See [S3 remotes](#s3-remotes). |
191
+
192
+
Pod operations require an auth token (`LOCALSTACK_AUTH_TOKEN` or a prior `lstk login`); local-file snapshots do not.
|`--merge <strategy>`| How the loaded state combines with running state. One of `account-region-merge` (default), `overwrite`, `service-merge`. |
223
+
|`--profile <name>`| AWS profile to read S3 credentials from (used only for `s3://` sources). Defaults to `AWS_*` env vars, then `AWS_PROFILE`. |
224
+
225
+
-`account-region-merge` (default): the snapshot wins on any `(service, account, region)` overlap.
226
+
-`overwrite`: running state is reset first, then the snapshot is imported onto a clean state.
227
+
-`service-merge`: the snapshot wins per resource; non-overlapping resources are combined.
228
+
229
+
The aliases behave identically:
230
+
231
+
```bash
232
+
lstk save pod:my-baseline
233
+
lstk load ./checkpoint
234
+
```
235
+
236
+
#### `snapshot list`
237
+
238
+
List the Cloud Pod snapshots available on the LocalStack platform.
239
+
By default, only snapshots you created are listed; pass `--all` to include every snapshot in your organization.
240
+
This subcommand operates on Cloud Pods, so it requires authentication.
241
+
242
+
```bash
243
+
# Snapshots you created
244
+
lstk snapshot list
245
+
246
+
# Every snapshot in your organization
247
+
lstk snapshot list --all
248
+
249
+
# List snapshots in your own S3 bucket (requires a running emulator)
250
+
lstk snapshot list s3://my-bucket/prefix
251
+
```
252
+
253
+
Passing an `s3://bucket/prefix` location lists snapshots stored in your own S3 bucket instead of the platform (see [S3 remotes](#s3-remotes)). Unlike the platform listing, this queries the emulator, so it requires a running emulator.
|`--force`| Skip the confirmation prompt. Required when running non-interactively. |
278
+
279
+
#### `snapshot show`
280
+
281
+
Show metadata for a single Cloud Pod snapshot on the LocalStack platform: its name, created date, size, LocalStack version, message, the services it contains, and per-service resource counts (resource counts render only when the platform has them for that snapshot).
282
+
This subcommand is cloud-only and requires authentication.
283
+
284
+
```bash
285
+
lstk snapshot show pod:my-baseline
286
+
```
287
+
288
+
The required `REF` argument must be a `pod:<name>` Cloud Pod reference.
289
+
290
+
#### S3 remotes
291
+
292
+
`snapshot save`, `load`, and `list` can target a snapshot stored in your **own S3 bucket** by passing an `s3://bucket/prefix` location.
293
+
The pod name (the snapshot's identity within the bucket) is a positional separate from the `s3://` location — required for `load`, auto-generated for `save` when omitted, and unused for `list`.
294
+
295
+
```bash
296
+
lstk snapshot save my-pod s3://my-bucket/prefix
297
+
lstk snapshot load my-pod s3://my-bucket/prefix
298
+
lstk snapshot list s3://my-bucket/prefix
299
+
```
300
+
301
+
Credentials follow AWS CLI precedence: `--profile <name>` wins, otherwise the static `AWS_ACCESS_KEY_ID`/`AWS_SECRET_ACCESS_KEY` (plus optional `AWS_SESSION_TOKEN`) environment variables, otherwise the profile named by `AWS_PROFILE`.
302
+
Only static credentials are supported (no SSO, assume-role, or `credential_process`), and credentials must never be embedded in the URL.
303
+
304
+
`lstk` runs a pre-flight check that the target bucket exists and errors out rather than letting the emulator auto-create a bucket on a typo.
305
+
Because the transfer is performed by the emulator (not the CLI), S3 remotes require a **running emulator**, and `list s3://…` in particular queries the emulator rather than the platform API.
306
+
307
+
:::note
308
+
`remove` and `show` do not support S3; they operate on Cloud Pods only.
@@ -25,7 +24,7 @@ import TroubleshootingCommon from '@/components/lstk/TroubleshootingCommon.mdx';
25
24
It provides a built-in terminal UI (TUI) for interactive use and plain text output for CI/CD pipelines and scripting.
26
25
27
26
`lstk` handles the full emulator lifecycle: authentication, pulling the Docker image, starting, stopping, and restarting the container, streaming logs, and checking status.
28
-
It can also save and load emulator state (as local snapshots or Cloud Pods) and manage the on-disk volume.
27
+
It can also persist emulator state across restarts and manage the on-disk volume.
29
28
Running `lstk` with no arguments takes you through the entire startup flow automatically.
30
29
31
30
`lstk` also proxies the Azure CLI (`lstk az`) so it runs directly against the Azure emulator.
@@ -87,7 +86,9 @@ Like the other CLI proxies, `lstk az` does not start the emulator — start it f
87
86
It requires the `az` CLI to be installed and on your `PATH`.
88
87
:::
89
88
90
-
<SnapshotCommands />
89
+
:::note
90
+
`lstk` does not currently support `snapshot` or `reset` for the Azure emulator — those commands are AWS-only. `lstk start --persist` is the only state-retention option available.
0 commit comments