@localstack/lstk_darwin_amd64 0.16.0 → 0.17.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/README.md +71 -5
  2. package/lstk +0 -0
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -47,9 +47,13 @@ Running `lstk` will automatically handle configuration setup and start LocalStac
47
47
  - **Log streaming** — tail emulator logs in real-time with `--follow`; use `--verbose` to show all logs without filtering
48
48
  - **Snapshots** — save, load, and remove emulator state as local files, named cloud snapshots (`pod:` prefix), or in your own S3 bucket (`s3://`), and auto-load one on start
49
49
  - **Browser-based login** — authenticate via browser and store credentials securely in the system keyring
50
+ - **AWS CLI proxy** — run `lstk aws <args>` with endpoint, credentials, and region pre-configured
50
51
  - **AWS CLI profile** — optionally configure a `localstack` profile in `~/.aws/` after start
51
52
  - **Terraform integration** — proxy Terraform commands to LocalStack with automatic AWS provider endpoint configuration
52
53
  - **CDK integration** — proxy AWS CDK commands to LocalStack with automatic endpoint configuration (requires AWS CDK >= 2.177.0)
54
+ - **SAM integration** — proxy AWS SAM CLI commands to LocalStack (requires AWS SAM CLI >= 1.95.0)
55
+ - **Reset / restart** — clear in-memory emulator state with `lstk reset`, or restart the emulator with `lstk restart`
56
+ - **Extensions** — Git-style `lstk-<name>` executables extend the CLI with new commands
53
57
  - **Self-update** — check for and install the latest `lstk` release with `lstk update`
54
58
  - **Shell completions** — bash, zsh, and fish completions included
55
59
 
@@ -94,11 +98,14 @@ port = "4566"
94
98
 
95
99
  The chosen emulator must be running before you set up or use its CLI integration below.
96
100
 
101
+ > [!NOTE]
102
+ > Only one `[[containers]]` block can be enabled at a time — running multiple emulators together (e.g. AWS and Snowflake) isn't supported yet.
103
+
97
104
  You can also configure cloud CLI integration:
98
105
 
99
106
  ```bash
100
107
  lstk setup aws # localstack profile in ~/.aws/
101
- lstk setup azure # isolated Azure CLI config for `lstk az` (requires the Azure CLI)
108
+ lstk setup azure # isolated Azure CLI config for `lstk az` (requires the Azure CLI); alias: lstk setup az
102
109
  ```
103
110
 
104
111
  After starting the Azure emulator and running `lstk setup azure`, run Azure CLI commands against LocalStack with `lstk az`:
@@ -132,6 +139,7 @@ lstk --config /path/to/config.toml start
132
139
  type = "aws" # Emulator type. Currently supported: "aws", "snowflake", "azure"
133
140
  tag = "latest" # Docker image tag, e.g. "latest", "2026.03"
134
141
  port = "4566" # Host port the emulator will be accessible on
142
+ # image = "" # Override the default Docker image, e.g. an internal registry mirror (see below)
135
143
  # volumes = [] # Bind mounts, "host:container[:ro]" (see below)
136
144
  # env = [] # Named environment profiles to apply (see [env.*] sections below)
137
145
  # snapshot = "pod:my-baseline" # Snapshot REF auto-loaded on start (AWS only); see Snapshots below
@@ -141,6 +149,7 @@ port = "4566" # Host port the emulator will be accessible on
141
149
  - `type`: emulator type; one of `"aws"`, `"snowflake"`, or `"azure"`
142
150
  - `tag`: Docker image tag for LocalStack (e.g. `"latest"`, `"4.14.0"`); useful for pinning a version
143
151
  - `port`: port LocalStack listens on (default `4566`)
152
+ - `image`: (optional) override the default `localstack/<product>:<tag>` image, e.g. `"my-registry.example.com/localstack:latest"` for an internal mirror or a locally loaded offline image; if it already carries a tag, `tag` above is ignored
144
153
  - `volumes`: (optional) list of `"host:container[:ro]"` bind mounts, e.g. for init hooks or the persistent-state directory (see below)
145
154
  - `env`: (optional) list of named environment variable groups to inject into the container (see below)
146
155
  - `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))
@@ -168,6 +177,22 @@ EAGER_SERVICE_LOADING = "1"
168
177
 
169
178
  Host environment variables prefixed with `LOCALSTACK_` are also forwarded to the emulator.
170
179
 
180
+ ### Exposing the emulator beyond localhost
181
+
182
+ By default the gateway (and its published ports) are only reachable from `localhost`. To expose it more broadly (e.g. on an EC2 or VM host), set `GATEWAY_LISTEN` in an `[env.*]` profile:
183
+
184
+ ```toml
185
+ [[containers]]
186
+ type = "aws"
187
+ port = "4566"
188
+ env = ["public"]
189
+
190
+ [env.public]
191
+ GATEWAY_LISTEN = "0.0.0.0:4566,0.0.0.0:443"
192
+ ```
193
+
194
+ The host part of the first entry becomes the bind address for every published port (the gateway ports and the 4510-4559 service range); it defaults to `127.0.0.1` when unset.
195
+
171
196
  ### Mounting volumes and init hooks
172
197
 
173
198
  Use `volumes` to bind-mount host files or directories into the emulator, given as Docker-style `"host:container[:ro]"` strings. The most common use is [init hooks](https://docs.localstack.cloud/snowflake/capabilities/init-hooks/) — scripts LocalStack runs automatically on startup when mounted into `/etc/localstack/init/{boot,start,ready,shutdown}.d`:
@@ -198,7 +223,7 @@ volumes = ["/data:/var/lib/localstack"]
198
223
  `lstk start` degrades gracefully when the common enterprise blockers (Docker Hub unreachable, a forward proxy, TLS interception, or an unreachable license server) make a network request fail:
199
224
 
200
225
  - If the image cannot be pulled but is already present locally, `lstk` warns and starts the local image instead of failing.
201
- - If the license server cannot be reached, `lstk` skips its pre-flight check and lets the emulator validate its own bundled license at startup. A definitive rejection from the server (e.g. an invalid token) stays fatal.
226
+ - If the license server cannot be reached, `lstk` skips its pre-flight check and lets the emulator validate the license at startup. A definitive rejection from the server (e.g. an invalid token) stays fatal.
202
227
 
203
228
  Pair this with a custom `image` in the config to point at a locally loaded image or an internal-registry mirror.
204
229
 
@@ -223,6 +248,15 @@ lstk --non-interactive
223
248
  | `LSTK_OTEL=1` | Enables OpenTelemetry trace export (disabled by default). When enabled, standard `OTEL_EXPORTER_OTLP_*` env vars are respected by the SDK (e.g. `OTEL_EXPORTER_OTLP_ENDPOINT` defaults to `http://localhost:4318`). Requires an OTLP-compatible backend to receive and visualize telemetry — for local development, `make otel` starts one (UI at http://localhost:16686). |
224
249
  | `DOCKER_HOST` | Override the Docker daemon socket (e.g. `unix:///home/user/.colima/default/docker.sock`). When unset, lstk tries the default socket and then probes common alternatives (Colima, OrbStack). |
225
250
 
251
+ ### AWS CLI Proxy
252
+
253
+ `lstk aws <args>` runs the AWS CLI against LocalStack with the endpoint, credentials, and region pre-configured — equivalent to `aws --endpoint-url http://localhost:4566 <args>` with `AWS_ACCESS_KEY_ID`, `AWS_SECRET_ACCESS_KEY`, and `AWS_DEFAULT_REGION` set automatically. Requires the AWS CLI on your `PATH`. This is separate from `lstk setup aws`, which configures a persistent `localstack` profile in `~/.aws/` instead.
254
+
255
+ ```bash
256
+ lstk aws s3 ls
257
+ lstk aws sqs list-queues
258
+ ```
259
+
226
260
  ### Terraform Integration
227
261
 
228
262
  `lstk terraform` (alias `tf`) is a proxy that runs Terraform commands against LocalStack, automatically configuring the AWS provider to use LocalStack's endpoints. This allows you to test infrastructure-as-code locally before deploying to AWS.
@@ -256,6 +290,25 @@ CDK always targets the default LocalStack account 000000000000; there is no --ac
256
290
  - `AWS_ENDPOINT_URL_S3` — Override the auto-derived S3 endpoint
257
291
  - `AWS_REGION` — Fallback for `--region` flag
258
292
 
293
+ ### SAM Integration
294
+
295
+ `lstk sam` is a proxy that runs AWS SAM CLI commands against LocalStack, automatically configuring the endpoint and credentials.
296
+
297
+ **Requires AWS SAM CLI version 1.95.0 or newer** on your `PATH` (older versions ignore `AWS_ENDPOINT_URL` and would target real AWS).
298
+
299
+ **lstk-specific flags** (appear after the `sam` subcommand):
300
+ - `--region <region>` — Deployment region (default: `us-east-1`)
301
+ - `--account <id>` — Target AWS account ID, 12 digits (default: `000000000000`)
302
+
303
+ **Environment variables:**
304
+ - `LSTK_SAM_CMD` — SAM binary to invoke (default: `sam`)
305
+ - `AWS_ENDPOINT_URL` — Override the auto-resolved LocalStack endpoint
306
+ - `AWS_ENDPOINT_URL_S3` — Override the auto-derived S3 endpoint
307
+ - `AWS_REGION` — Fallback for `--region` flag
308
+ - `AWS_ACCESS_KEY_ID` — Fallback for `--account` flag
309
+
310
+ Known limitations versus `samlocal`: image/container-based Lambda (ECR) deploys and nested CloudFormation stacks are not supported.
311
+
259
312
  ## Usage
260
313
 
261
314
  ```bash
@@ -268,6 +321,12 @@ LOCALSTACK_AUTH_TOKEN=<token> lstk --non-interactive
268
321
  # Stop the running emulator
269
322
  lstk stop
270
323
 
324
+ # Restart the emulator
325
+ lstk restart
326
+
327
+ # Clear in-memory emulator state (buckets, functions, etc.) without stopping it
328
+ lstk reset
329
+
271
330
  # Show emulator status and deployed resources
272
331
  lstk status
273
332
 
@@ -292,6 +351,9 @@ lstk update
292
351
  # Show resolved config file path
293
352
  lstk config path
294
353
 
354
+ # Run AWS CLI commands against LocalStack
355
+ lstk aws s3 ls
356
+
295
357
  # Set up AWS CLI profile integration
296
358
  lstk setup aws
297
359
 
@@ -305,7 +367,7 @@ lstk az group list
305
367
  lstk az start-interception
306
368
  lstk az stop-interception
307
369
 
308
- # Save emulator state to a local file
370
+ # Save emulator state to a local file (`lstk save` is a shortcut for `lstk snapshot save`)
309
371
  lstk snapshot save ./my-snapshot.snapshot
310
372
 
311
373
  # Save emulator state as a named cloud snapshot on the LocalStack platform
@@ -314,7 +376,7 @@ lstk snapshot save pod:my-baseline
314
376
  # Save to your own S3 bucket (credentials from AWS_* env vars or --profile)
315
377
  lstk snapshot save my-pod s3://my-bucket/prefix
316
378
 
317
- # Load a snapshot back into the running emulator
379
+ # Load a snapshot back into the running emulator (`lstk load` is a shortcut for `lstk snapshot load`)
318
380
  lstk snapshot load pod:my-baseline
319
381
  lstk snapshot load my-pod s3://my-bucket/prefix
320
382
 
@@ -346,6 +408,10 @@ lstk cdk deploy --require-approval never
346
408
  # Synthesize a CDK app (offline, no running emulator needed)
347
409
  lstk cdk synth
348
410
 
411
+ # Build and deploy a SAM app against LocalStack
412
+ lstk sam build
413
+ lstk sam deploy
414
+
349
415
  ```
350
416
 
351
417
  ## Snapshots
@@ -425,7 +491,7 @@ lstk start --no-snapshot # skip auto-loading this run
425
491
 
426
492
  ## Extensions
427
493
 
428
- lstk supports Git-style extensions: running `lstk <name>`, for a name that isn't a built-in command, delegates to an external `lstk-<name>` executable found on your `PATH`, forwarding all arguments and passing stdin/stdout/stderr through.
494
+ lstk supports Git-style extensions: running `lstk <name>`, for a name that isn't a built-in command, resolves and delegates to an external `lstk-<name>` executable checked first in lstk's bundled-extensions directory, then on your `PATH` forwarding all arguments and passing stdin/stdout/stderr through.
429
495
 
430
496
  ```bash
431
497
  lstk my-tool --flag # resolves and runs lstk-my-tool, if it exists
package/lstk CHANGED
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@localstack/lstk_darwin_amd64",
3
- "version": "0.16.0",
3
+ "version": "0.17.0",
4
4
  "bin": {
5
5
  "lstk_darwin_amd64": "lstk"
6
6
  },