From 8ccb64500240861b85b3c62ded75825ed2f6761f Mon Sep 17 00:00:00 2001 From: Quetzalli Date: Tue, 1 Sep 2026 21:37:46 +0200 Subject: [PATCH 1/3] DOC-428: Update remainder of Snowflake docs to push lstk Follows the same lstk migration already done for AWS/Azure docs and for Snowflake Getting Started (#878). Covers everything else under /snowflake/ that still referenced the legacy `localstack` CLI: - capabilities/configuration.md: rewrite the env var intro and the "CLI" section to match AWS's configuration-options.md pattern (LOCALSTACK_-prefixed env vars, .lstk/config.toml env profiles, cross-link to the lstk config reference). Drop the "Profiles" section entirely (CONFIG_PROFILE/*.env files have no lstk equivalent, same as the AWS docs already did) and fold LOCALSTACK_VOLUME_DIR into the Docker table. - capabilities/init-hooks.mdx: replace the CLI tab with the lstk .lstk/config.toml `volumes` pattern, matching aws/customization/advanced/initialization-hooks.mdx. - capabilities/state-management.mdx: `PERSISTENCE=1 localstack start` -> `lstk start --persist`; `localstack state export/import` -> `lstk snapshot save/load`, matching the AWS persistence and snapshots docs. - tooling/user-interface.md and the three tutorials: swap the `localstack` CLI prerequisite links and `localstack start --stack snowflake` invocations for `lstk`/`lstk start --type snowflake`, and prefix forwarded env vars with LOCALSTACK_ where needed. --- .../snowflake/capabilities/configuration.md | 84 ++++++------------- .../snowflake/capabilities/init-hooks.mdx | 22 +++-- .../capabilities/state-management.mdx | 13 ++- .../docs/snowflake/tooling/user-interface.md | 2 +- .../aws-lambda-localstack-snowpark.md | 10 +-- ...credit-scoring-with-localstack-snowpark.md | 4 +- .../s3-tables-iceberg-integration.md | 4 +- 7 files changed, 58 insertions(+), 81 deletions(-) diff --git a/src/content/docs/snowflake/capabilities/configuration.md b/src/content/docs/snowflake/capabilities/configuration.md index 021380980..f38b4c0d1 100644 --- a/src/content/docs/snowflake/capabilities/configuration.md +++ b/src/content/docs/snowflake/capabilities/configuration.md @@ -8,12 +8,30 @@ label: LocalStack exposes various configuration options to control its behaviour. -These options can be passed to LocalStack as environment variables like so: +With `lstk`, these options can be passed as `LOCALSTACK_`-prefixed environment variables when starting the container: ```bash -DEBUG=1 localstack start --stack snowflake +LOCALSTACK_DEBUG=1 lstk start ``` +Alternatively, set them as named environment profiles in your config file and reference them from the container block: + +```toml +# .lstk/config.toml +[[containers]] +type = "snowflake" +env = ["debug"] + +[env.debug] +DEBUG = "1" +``` + +```bash +lstk start +``` + +See [Passing environment variables to the container](/aws/developer-tools/running-localstack/lstk#passing-environment-variables-to-the-container) for details. + ## Core Options that affect the core Snowflake emulator functionality. @@ -35,11 +53,11 @@ Options that affect the core Snowflake emulator functionality. By default, the Snowflake emulator accepts requests for hostnames such as `snowflake.localhost.localstack.cloud` and other `*.snowflake.*` hostnames. If you expose the emulator through a custom DNS name, for example in Kubernetes or behind an ingress, set `SF_HOSTNAMES` to the exact hostnames clients use to reach the emulator. -When you use the `localstack` CLI, add the `LOCALSTACK_` prefix so the CLI passes the variable to the container: +When you use `lstk`, add the `LOCALSTACK_` prefix so the CLI passes the variable to the container: ```bash LOCALSTACK_SF_HOSTNAMES=snowflake.internal.example.com,snowflake.internal,snowflake.localhost.localstack.cloud \ -localstack start --stack snowflake +lstk start ``` The first hostname in `SF_HOSTNAMES` is used as the primary hostname for local connection defaults and generated URLs. @@ -75,7 +93,7 @@ If your custom hostname also needs a matching TLS certificate, use LocalStack's LOCALSTACK_SF_HOSTNAMES=snowflake.internal.example.com \ CUSTOM_SSL_CERT_PATH=/var/lib/localstack/custom/cert.pem \ SKIP_SSL_CERT_DOWNLOAD=1 \ -localstack start --stack snowflake +lstk start ``` The file referenced by `CUSTOM_SSL_CERT_PATH` must contain a certificate and private key that match the hostname used by your Snowflake clients. @@ -83,13 +101,8 @@ For more general guidance on adding trusted certificates to LocalStack, see [Cus ## CLI -These options are applicable when using the CLI to start LocalStack. - -| Variable | Example Values | Description | -| - | - | - | -| `LOCALSTACK_VOLUME_DIR` | `~/.cache/localstack/volume` (on Linux) | The location on the host of the LocalStack volume directory mount. | -| `CONFIG_PROFILE` | | The configuration profile to load. See [Profiles](#profiles) | -| `CONFIG_DIR` | `~/.localstack` | The path where LocalStack can find configuration profiles and other CLI-specific configuration | +`lstk` is configured through its config file rather than through environment variables. +See [Configuration](/aws/developer-tools/running-localstack/lstk#configuration) on the `lstk` page for the config file search order, the field reference, and how to define named environment profiles. ## Docker @@ -97,55 +110,10 @@ Options to configure how LocalStack interacts with Docker. | Variable | Example Values | Description | | - | - | - | +| `LOCALSTACK_VOLUME_DIR` | `~/.cache/localstack/volume` (on Linux) | The location on the host of the LocalStack volume directory mount. | | `DOCKER_FLAGS` | | Allows to pass custom flags (e.g., volume mounts) to "docker run" when running LocalStack in Docker. | | `DOCKER_SOCK` | `/var/run/docker.sock` | Path to local Docker UNIX domain socket | | `DOCKER_BRIDGE_IP` | `172.17.0.1` | IP of the Docker bridge used to enable access between containers | | `LEGACY_DOCKER_CLIENT` | `0`\|`1` | Whether LocalStack should use the command-line Docker client and subprocess execution to run Docker commands, rather than the Docker SDK. | | `DOCKER_CMD` | `docker` (default), `sudo docker`| Shell command used to run Docker containers (only used in combination with `LEGACY_DOCKER_CLIENT`) | | `FORCE_NONINTERACTIVE` | | When running with Docker, disables the `--interactive` and `--tty` flags. Useful when running headless. | - -## Profiles - -LocalStack supports configuration profiles which are stored in the `~/.localstack` config directory. -A configuration profile is a set of environment variables stored in a `*.env` file in the LocalStack config directory. - -Here is an example of what configuration profiles might look like: - -```bash -tree ~/.localstack -/home/username/.localstack -├── default.env -├── dev.env -└── pro.env -``` - -Here is an example of what a specific environment profile looks like - -```bash -cat ~/.localstack/pro-debug.env -LOCALSTACK_AUTH_TOKEN=XXXXX -SF_LOG=trace -SF_S3_ENDPOINT=s3.localhost.localstack.cloud:4566 -``` - -You can load a profile by either setting the environment variable `CONFIG_PROFILE=` or the `--profile=` CLI flag when using the CLI. -Let's take an example to load the `dev.env` profile file if it exists: - -```bash -localstack --profile=dev start --stack snowflake -``` - -If no profile is specified, the `default.env` profile will be loaded. -If explicitly specified, any environment variables will overwrite the configurations defined in the profile. - -To display the config environment variables, you can use the following command: - -```bash -localstack --profile=dev config show -``` - -:::note -The `CONFIG_PROFILE` is a CLI feature and cannot be used directly with a docker-compose setup. -You can look at [alternative means of setting environment variables](https://docs.docker.com/compose/environment-variables/set-environment-variables/) for your Docker Compose setups. -For Docker setups, we recommend passing the environment variables directly to the `docker run` command. -::: diff --git a/src/content/docs/snowflake/capabilities/init-hooks.mdx b/src/content/docs/snowflake/capabilities/init-hooks.mdx index 2131d96c8..a82bc5814 100644 --- a/src/content/docs/snowflake/capabilities/init-hooks.mdx +++ b/src/content/docs/snowflake/capabilities/init-hooks.mdx @@ -27,7 +27,7 @@ CREATE DATABASE test123; SHOW DATABASES; ``` -Mount the script into `/etc/localstack/init/ready.d/` using Docker Compose or the `localstack` CLI: +Mount the script into `/etc/localstack/init/ready.d/` using Docker Compose or `lstk`: @@ -51,12 +51,22 @@ services: - "/var/run/docker.sock:/var/run/docker.sock" ``` - + +Declare the bind mount and the `DEBUG` profile in your config file, then start LocalStack: + +```toml +# .lstk/config.toml +[[containers]] +type = "snowflake" +env = ["debug"] +volumes = ["/path/to/test.sf.sql:/etc/localstack/init/ready.d/test.sf.sql"] + +[env.debug] +DEBUG = "1" +``` + ```bash -# DOCKER_FLAGS are additional parameters to the `docker run` command of localstack start -DOCKER_FLAGS='-v /path/to/test.sf.sql:/etc/localstack/init/ready.d/test.sf.sql' \ -DEBUG=1 \ -localstack start --stack snowflake +lstk start ``` diff --git a/src/content/docs/snowflake/capabilities/state-management.mdx b/src/content/docs/snowflake/capabilities/state-management.mdx index 10f47a187..3a11bf392 100644 --- a/src/content/docs/snowflake/capabilities/state-management.mdx +++ b/src/content/docs/snowflake/capabilities/state-management.mdx @@ -21,14 +21,13 @@ State Management is an essential feature that supports various use-cases, such a LocalStack’s Persistence mechanism enables the saving and restoration of the entire LocalStack state. It functions as a **pause and resume** feature, allowing you to take a snapshot of your LocalStack instance and save this data to disk. This mechanism ensures a quick and efficient way to preserve and continue your work with Snowflake resources locally. -To start snapshot-based persistence, launch LocalStack with the configuration option `PERSISTENCE=1`. This setting instructs LocalStack to save all local Snowflake resources and their respective application states into the LocalStack Volume Directory. Upon restarting LocalStack, you'll be able to resume your activities exactly where you left off. +To start snapshot-based persistence, launch LocalStack with the `--persist` command-line option, or the configuration option `PERSISTENCE=1`. This setting instructs LocalStack to save all local Snowflake resources and their respective application states into the LocalStack Volume Directory. Upon restarting LocalStack, you'll be able to resume your activities exactly where you left off. - + ```bash export LOCALSTACK_AUTH_TOKEN= -PERSISTENCE=1 \ -localstack start --stack snowflake +lstk start --persist ``` @@ -69,17 +68,17 @@ The Export/Import State feature enables you to export the state of your LocalSta To export the state, you can run the following command: ```bash -localstack state export '' +lstk snapshot save '' ``` -You can use the `` argument to specify a file path to export the state to. If you do not specify a file path, the state will be exported to the current working directory into a file named `ls-state-export`. +You can use the `` argument to specify a file path to export the state to. If you do not specify a file path, the state will be exported to the current working directory into an auto-named snapshot file. ### Import the State To import the state, you can run the following command: ```bash -localstack state import '' +lstk snapshot load '' ``` The `` argument is required and specifies the file path to import the state from. The file should be generated from a previous export. diff --git a/src/content/docs/snowflake/tooling/user-interface.md b/src/content/docs/snowflake/tooling/user-interface.md index 7a6d8d99e..3d70c20e5 100644 --- a/src/content/docs/snowflake/tooling/user-interface.md +++ b/src/content/docs/snowflake/tooling/user-interface.md @@ -23,7 +23,7 @@ This guide is designed for users new to the Snowflake emulator Web UI. Start you ```bash export LOCALSTACK_AUTH_TOKEN= -localstack start --stack snowflake +lstk start ``` Navigate to [**https://app.localstack.cloud/inst/default/snowflake**](https://app.localstack.cloud/inst/default/snowflake) to access the User Interface. diff --git a/src/content/docs/snowflake/tutorials/aws-lambda-localstack-snowpark.md b/src/content/docs/snowflake/tutorials/aws-lambda-localstack-snowpark.md index 368123de1..a778de0eb 100644 --- a/src/content/docs/snowflake/tutorials/aws-lambda-localstack-snowpark.md +++ b/src/content/docs/snowflake/tutorials/aws-lambda-localstack-snowpark.md @@ -19,7 +19,7 @@ The code in this tutorial is available on [GitHub](https://github.com/localstack ## Prerequisites -- [`localstack` CLI](/snowflake/getting-started/) with a [`LOCALSTACK_AUTH_TOKEN`](/snowflake/getting-started/auth-token/) +- [`lstk`](/snowflake/getting-started/) with a [`LOCALSTACK_AUTH_TOKEN`](/snowflake/getting-started/auth-token/) - [LocalStack for Snowflake](/snowflake/getting-started/) - [AWS CLI](https://docs.aws.amazon.com/cli/latest/userguide/install-cliv2.html) & [`awslocal` wrapper](/aws/connecting/aws-cli/#localstack-aws-cli-awslocal) - Python 3.10 installed locally @@ -141,9 +141,9 @@ Start your LocalStack container in your preferred terminal/shell. ```bash showLineNumbers export LOCALSTACK_AUTH_TOKEN= -DEBUG=1 \ -LAMBDA_RUNTIME_ENVIRONMENT_TIMEOUT=180 \ -localstack start --stack snowflake +LOCALSTACK_DEBUG=1 \ +LOCALSTACK_LAMBDA_RUNTIME_ENVIRONMENT_TIMEOUT=180 \ +lstk start --type snowflake ``` > The `DEBUG=1` environment variable is set to enable debug logs. It would allow you to see the SQL queries executed by the Lambda function. The `LAMBDA_RUNTIME_ENVIRONMENT_TIMEOUT` environment variable is set to increase the Lambda function's timeout to 180 seconds. @@ -170,7 +170,7 @@ awslocal lambda invoke --function-name localstack-snowflake-lambda-example \ --payload '{"body": "test"}' output.txt ``` -You will receive a response with the details of the invocation. You can view the output in the `output.txt` file. To see the SQL queries executed by the Lambda function, check the logs by navigating to LocalStack logs (`localstack logs`). +You will receive a response with the details of the invocation. You can view the output in the `output.txt` file. To see the SQL queries executed by the Lambda function, check the logs by navigating to LocalStack logs (`lstk logs`). ```bash 2024-02-07T17:33:36.763 DEBUG --- [ asgi_gw_3] l.s.l.i.version_manager : [localstack-snowflake-lambda-example-b0813b21-ad5f-4ec7-8fb4-53147df9695e] Total # of rows: 3 diff --git a/src/content/docs/snowflake/tutorials/credit-scoring-with-localstack-snowpark.md b/src/content/docs/snowflake/tutorials/credit-scoring-with-localstack-snowpark.md index 0957f3c8d..dcf67b46f 100644 --- a/src/content/docs/snowflake/tutorials/credit-scoring-with-localstack-snowpark.md +++ b/src/content/docs/snowflake/tutorials/credit-scoring-with-localstack-snowpark.md @@ -14,7 +14,7 @@ The Jupyter Notebook and the dataset used in this tutorial are available on [Git ## Prerequisites -- [`localstack` CLI](/snowflake/getting-started/) with a [`LOCALSTACK_AUTH_TOKEN`](/snowflake/getting-started/auth-token/) +- [`lstk`](/snowflake/getting-started/) with a [`LOCALSTACK_AUTH_TOKEN`](/snowflake/getting-started/auth-token/) - [LocalStack for Snowflake](/snowflake/getting-started/) - [Snowpark](/snowflake/integrations/snowpark) with other Python libraries - [Jupyter Notebook](https://jupyter.org/install#jupyter-notebook) @@ -27,7 +27,7 @@ Start your LocalStack container in your preferred terminal/shell. ```bash export LOCALSTACK_AUTH_TOKEN= -localstack start --stack snowflake +lstk start --type snowflake ``` ## Create a Snowpark session diff --git a/src/content/docs/snowflake/tutorials/s3-tables-iceberg-integration.md b/src/content/docs/snowflake/tutorials/s3-tables-iceberg-integration.md index b8498733e..0e4d8b231 100644 --- a/src/content/docs/snowflake/tutorials/s3-tables-iceberg-integration.md +++ b/src/content/docs/snowflake/tutorials/s3-tables-iceberg-integration.md @@ -18,7 +18,7 @@ With LocalStack's Snowflake emulator, you can create catalog integrations that c ## Prerequisites -- [`localstack` CLI](/snowflake/getting-started/) with a [`LOCALSTACK_AUTH_TOKEN`](/snowflake/getting-started/auth-token/) +- [`lstk`](/snowflake/getting-started/) with a [`LOCALSTACK_AUTH_TOKEN`](/snowflake/getting-started/auth-token/) - [LocalStack for Snowflake](/snowflake/getting-started/) - [AWS CLI](https://docs.aws.amazon.com/cli/latest/userguide/install-cliv2.html) & [`awslocal` wrapper](/aws/connecting/aws-cli/#localstack-aws-cli-awslocal) - Python 3.10+ with `pyiceberg` and `pyarrow` installed @@ -29,7 +29,7 @@ Start your LocalStack container with the Snowflake emulator enabled. ```bash export LOCALSTACK_AUTH_TOKEN= -localstack start --stack snowflake +lstk start --type snowflake ``` ## Create S3 Tables resources From fc3bfd0440e40898066fa0bd32590534922c7c43 Mon Sep 17 00:00:00 2001 From: Quetzalli Date: Mon, 7 Sep 2026 09:37:00 +0200 Subject: [PATCH 2/3] DOC-428: Address review feedback and fix remaining awslocal usage - capabilities/configuration.md: replace the two bash export examples for custom Snowflake hostnames with the .lstk/config.toml env profile pattern Maureen specified in PRO-327, instead of exporting LOCALSTACK_-prefixed env vars inline. - capabilities/init-hooks.mdx: add an inline comment noting DEBUG is optional and only helps diagnose init hook issues, not required. - capabilities/state-management.mdx: note that resuming a persisted session or restarting with persistence on requires passing --persist again (lstk start --persist / lstk restart --persist); rename the placeholder to for clarity; link to the lstk snapshot docs for the full list of supported save destinations. - tutorials/credit-scoring-with-localstack-snowpark.md and tutorials/s3-tables-iceberg-integration.md: simplify `lstk start --type snowflake` to plain `lstk start`. - Fix the bigger issue Maureen found: awslocal was still used in eight feature/integration docs this PR's scope missed (snowpipe, glue-catalog, storage-integrations, stages, dynamic-tables, iceberg-tables, polaris-catalog, airflow) plus two tutorials already touched by this PR. Replaced every awslocal invocation and prose reference with lstk aws, matching the pattern already established across the AWS docs (`lstk aws `, prereq links to /aws/developer-tools/running-localstack/lstk/#aws). --- .../snowflake/capabilities/configuration.md | 28 +++++++++++++++---- .../snowflake/capabilities/init-hooks.mdx | 2 +- .../capabilities/state-management.mdx | 19 ++++++++++--- .../docs/snowflake/features/dynamic-tables.md | 4 +-- .../docs/snowflake/features/glue-catalog.md | 10 +++---- .../docs/snowflake/features/iceberg-tables.md | 6 ++-- .../snowflake/features/polaris-catalog.md | 6 ++-- .../docs/snowflake/features/snowpipe.md | 8 +++--- .../docs/snowflake/features/stages.mdx | 6 ++-- .../features/storage-integrations.md | 6 ++-- .../docs/snowflake/integrations/airflow.md | 8 +++--- .../aws-lambda-localstack-snowpark.md | 10 +++---- ...credit-scoring-with-localstack-snowpark.md | 2 +- .../s3-tables-iceberg-integration.md | 8 +++--- 14 files changed, 76 insertions(+), 47 deletions(-) diff --git a/src/content/docs/snowflake/capabilities/configuration.md b/src/content/docs/snowflake/capabilities/configuration.md index f38b4c0d1..41bd4875d 100644 --- a/src/content/docs/snowflake/capabilities/configuration.md +++ b/src/content/docs/snowflake/capabilities/configuration.md @@ -53,10 +53,19 @@ Options that affect the core Snowflake emulator functionality. By default, the Snowflake emulator accepts requests for hostnames such as `snowflake.localhost.localstack.cloud` and other `*.snowflake.*` hostnames. If you expose the emulator through a custom DNS name, for example in Kubernetes or behind an ingress, set `SF_HOSTNAMES` to the exact hostnames clients use to reach the emulator. -When you use `lstk`, add the `LOCALSTACK_` prefix so the CLI passes the variable to the container: +When you use `lstk`, set this as a named environment profile in your config file: + +```toml +# .lstk/config.toml +[[containers]] +type = "snowflake" +env = ["custom"] + +[env.custom] +SF_HOSTNAMES = "snowflake.internal.example.com,snowflake.internal,snowflake.localhost.localstack.cloud" +``` ```bash -LOCALSTACK_SF_HOSTNAMES=snowflake.internal.example.com,snowflake.internal,snowflake.localhost.localstack.cloud \ lstk start ``` @@ -89,10 +98,19 @@ If you previously used `SF_HOSTNAME_REGEX`, migrate to `SF_HOSTNAMES` and list e If your custom hostname also needs a matching TLS certificate, use LocalStack's standard certificate configuration options: +```toml +# .lstk/config.toml +[[containers]] +type = "snowflake" +env = ["custom"] + +[env.custom] +SF_HOSTNAMES = "snowflake.internal.example.com" +CUSTOM_SSL_CERT_PATH = "/var/lib/localstack/custom/cert.pem" +SKIP_SSL_CERT_DOWNLOAD = "1" +``` + ```bash -LOCALSTACK_SF_HOSTNAMES=snowflake.internal.example.com \ -CUSTOM_SSL_CERT_PATH=/var/lib/localstack/custom/cert.pem \ -SKIP_SSL_CERT_DOWNLOAD=1 \ lstk start ``` diff --git a/src/content/docs/snowflake/capabilities/init-hooks.mdx b/src/content/docs/snowflake/capabilities/init-hooks.mdx index a82bc5814..a27506a9d 100644 --- a/src/content/docs/snowflake/capabilities/init-hooks.mdx +++ b/src/content/docs/snowflake/capabilities/init-hooks.mdx @@ -62,7 +62,7 @@ env = ["debug"] volumes = ["/path/to/test.sf.sql:/etc/localstack/init/ready.d/test.sf.sql"] [env.debug] -DEBUG = "1" +DEBUG = "1" # Optionally enable DEBUG, not required for init hooks but helps diagnose init hook issues ``` ```bash diff --git a/src/content/docs/snowflake/capabilities/state-management.mdx b/src/content/docs/snowflake/capabilities/state-management.mdx index 3a11bf392..71ab25b77 100644 --- a/src/content/docs/snowflake/capabilities/state-management.mdx +++ b/src/content/docs/snowflake/capabilities/state-management.mdx @@ -29,6 +29,17 @@ To start snapshot-based persistence, launch LocalStack with the `--persist` comm export LOCALSTACK_AUTH_TOKEN= lstk start --persist ``` + +To resume a persisted session after the emulator has stopped, or to restart a session while keeping persistence on, pass `--persist` again: + +```bash +lstk stop +lstk start --persist +``` + +```bash +lstk restart --persist +``` ```yaml showLineNumbers @@ -68,17 +79,17 @@ The Export/Import State feature enables you to export the state of your LocalSta To export the state, you can run the following command: ```bash -lstk snapshot save '' +lstk snapshot save '' ``` -You can use the `` argument to specify a file path to export the state to. If you do not specify a file path, the state will be exported to the current working directory into an auto-named snapshot file. +You can use the `` argument to specify a file path to export the state to. If you do not specify a file path, the state will be exported to the current working directory into an auto-named snapshot file. See the [lstk snapshot documentation](/aws/developer-tools/running-localstack/lstk/#snapshot) for the full list of supported save destinations, including local files and remote Cloud Pods. ### Import the State To import the state, you can run the following command: ```bash -lstk snapshot load '' +lstk snapshot load '' ``` -The `` argument is required and specifies the file path to import the state from. The file should be generated from a previous export. +The `` argument is required and specifies the file path to import the state from. The file should be generated from a previous export. diff --git a/src/content/docs/snowflake/features/dynamic-tables.md b/src/content/docs/snowflake/features/dynamic-tables.md index 908f06a54..44d4a1dab 100644 --- a/src/content/docs/snowflake/features/dynamic-tables.md +++ b/src/content/docs/snowflake/features/dynamic-tables.md @@ -100,10 +100,10 @@ A Dynamic Iceberg Table consists of three key concepts: ### Create an S3 bucket -Create a local S3 bucket using the `mb` command with the `awslocal` CLI: +Create a local S3 bucket using the `mb` command with `lstk aws`: ```bash -awslocal s3 mb s3://test-bucket +lstk aws s3 mb s3://test-bucket ``` ### Create an external volume diff --git a/src/content/docs/snowflake/features/glue-catalog.md b/src/content/docs/snowflake/features/glue-catalog.md index f93c9e27a..0fa629750 100644 --- a/src/content/docs/snowflake/features/glue-catalog.md +++ b/src/content/docs/snowflake/features/glue-catalog.md @@ -12,7 +12,7 @@ The Snowflake emulator can connect to this Glue Iceberg REST endpoint through a ## Getting started -This guide walks through creating an Iceberg table in S3 Tables through the Glue Iceberg REST endpoint, registering that table with the Snowflake emulator through a Glue catalog integration, and querying it with SQL. It assumes basic knowledge of the AWS CLI, our [`awslocal`](/aws/connecting/aws-cli/#localstack-aws-cli-awslocal) wrapper, and Snowflake. +This guide walks through creating an Iceberg table in S3 Tables through the Glue Iceberg REST endpoint, registering that table with the Snowflake emulator through a Glue catalog integration, and querying it with SQL. It assumes basic knowledge of the AWS CLI, our [`lstk aws`](/aws/developer-tools/running-localstack/lstk/#aws) command, and Snowflake. In this guide, you will: @@ -29,7 +29,7 @@ Start your Snowflake emulator and connect to it using an SQL client in order to The Glue Iceberg REST endpoint serves tables stored in S3 Tables. Create a table bucket: ```bash -awslocal s3tables create-table-bucket --name my-table-bucket +lstk aws s3tables create-table-bucket --name my-table-bucket ``` ```bash title="Output" @@ -41,7 +41,7 @@ awslocal s3tables create-table-bucket --name my-table-bucket Now create a namespace to hold the Iceberg table: ```bash -awslocal s3tables create-namespace \ +lstk aws s3tables create-namespace \ --table-bucket-arn arn:aws:s3tables:us-east-1:000000000000:bucket/my-table-bucket \ --namespace my_namespace ``` @@ -60,7 +60,7 @@ awslocal s3tables create-namespace \ Glue exposes S3 Tables buckets through a federated catalog. Register a catalog named `s3tablescatalog` that federates to all S3 Tables buckets in the account: ```bash showLineNumbers -awslocal glue create-catalog \ +lstk aws glue create-catalog \ --name s3tablescatalog \ --catalog-input '{ "FederatedCatalog": { @@ -75,7 +75,7 @@ awslocal glue create-catalog \ Confirm the catalog was registered: ```bash -awslocal glue get-catalogs +lstk aws glue get-catalogs ``` The response includes a `CatalogList` entry with `Name: s3tablescatalog` and a `FederatedCatalog` block pointing at S3 Tables. Snowflake will reference this catalog through its `WAREHOUSE` identifier in the form `:s3tablescatalog/`. diff --git a/src/content/docs/snowflake/features/iceberg-tables.md b/src/content/docs/snowflake/features/iceberg-tables.md index c83c65047..0bf486172 100644 --- a/src/content/docs/snowflake/features/iceberg-tables.md +++ b/src/content/docs/snowflake/features/iceberg-tables.md @@ -18,10 +18,10 @@ In this guide, you will create an external volume, and an Iceberg table to store ### Create an S3 bucket -You can create a local S3 bucket using the `mb` command with the `awslocal` CLI. +You can create a local S3 bucket using the `mb` command with `lstk aws`. ```bash -awslocal s3 mb s3://test-bucket +lstk aws s3 mb s3://test-bucket ``` ### Create an external volume @@ -81,5 +81,5 @@ The output should be: You can also list the content of the S3 bucket: ```bash -awslocal s3 ls --recursive s3://test-bucket/ +lstk aws s3 ls --recursive s3://test-bucket/ ``` diff --git a/src/content/docs/snowflake/features/polaris-catalog.md b/src/content/docs/snowflake/features/polaris-catalog.md index 9bf917d2a..1ddb06b28 100644 --- a/src/content/docs/snowflake/features/polaris-catalog.md +++ b/src/content/docs/snowflake/features/polaris-catalog.md @@ -99,10 +99,10 @@ curl -s -X PUT http://localhost:8181/api/management/v1/catalogs/polaris/catalog- ### Create a bucket -Create a bucket using the `awslocal` command: +Create a bucket using the `lstk aws` command: ```bash -awslocal s3 mb s3://$BUCKET_NAME +lstk aws s3 mb s3://$BUCKET_NAME ``` ### Create an external volume @@ -181,7 +181,7 @@ The output should be: All data will be persisted under: ```bash -awslocal s3 ls s3://$BUCKET_NAME/test/test_namespace/ +lstk aws s3 ls s3://$BUCKET_NAME/test/test_namespace/ ``` You will see: diff --git a/src/content/docs/snowflake/features/snowpipe.md b/src/content/docs/snowflake/features/snowpipe.md index 74a09c56f..7c915ebd0 100644 --- a/src/content/docs/snowflake/features/snowpipe.md +++ b/src/content/docs/snowflake/features/snowpipe.md @@ -18,10 +18,10 @@ In this guide, you will create a stage, and a pipe to load data from a local S3 ### Create an S3 bucket -You can create a local S3 bucket using the `mb` command with the `awslocal` CLI. +You can create a local S3 bucket using the `mb` command with `lstk aws`. ```bash -awslocal s3 mb s3://test-bucket +lstk aws s3 mb s3://test-bucket ``` ### Create a stage @@ -70,7 +70,7 @@ Retrieve the `notification_channel` value from the output of the `DESC PIPE` que You can use the [`PutBucketNotificationConfiguration`](https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketNotificationConfiguration.html) API to create a bucket notification configuration that sends notifications to Snowflake when new files are uploaded to the S3 bucket. ```bash showLineNumbers -awslocal s3api put-bucket-notification-configuration \ +lstk aws s3api put-bucket-notification-configuration \ --bucket test-bucket \ --notification-configuration file://notification.json ``` @@ -104,7 +104,7 @@ Copy a JSON file to the S3 bucket to trigger the pipe to load the data into the Upload the file to the S3 bucket: ```bash -awslocal s3 cp test.json s3://test-bucket/ +lstk aws s3 cp test.json s3://test-bucket/ ``` ### Check the data diff --git a/src/content/docs/snowflake/features/stages.mdx b/src/content/docs/snowflake/features/stages.mdx index 82330d8d1..ad4872e2f 100644 --- a/src/content/docs/snowflake/features/stages.mdx +++ b/src/content/docs/snowflake/features/stages.mdx @@ -88,11 +88,11 @@ The expected output is: ## Loading files from S3 -You can also load data from an S3 bucket using the `CREATE STAGE` command. Create a new S3 bucket named `testbucket` and upload the [employees CSV files](/artifacts/getting-started.zip) to the bucket. You can use LocalStack's `awslocal` CLI to create the S3 bucket and upload the files. +You can also load data from an S3 bucket using the `CREATE STAGE` command. Create a new S3 bucket named `testbucket` and upload the [employees CSV files](/artifacts/getting-started.zip) to the bucket. You can use LocalStack's `lstk aws` command to create the S3 bucket and upload the files. ```bash -awslocal s3 mb s3://testbucket -awslocal s3 cp employees0*.csv s3://testbucket +lstk aws s3 mb s3://testbucket +lstk aws s3 cp employees0*.csv s3://testbucket ``` In this example, you can create a stage called `my_s3_stage` to load data from an S3 bucket: diff --git a/src/content/docs/snowflake/features/storage-integrations.md b/src/content/docs/snowflake/features/storage-integrations.md index f388136f3..98725358b 100644 --- a/src/content/docs/snowflake/features/storage-integrations.md +++ b/src/content/docs/snowflake/features/storage-integrations.md @@ -18,16 +18,16 @@ In this guide, you will create a Snowflake Storage Integration with Amazon S3 an ### Create an S3 bucket -You can create a local S3 bucket using the `mb` command with the `awslocal` CLI. +You can create a local S3 bucket using the `mb` command with `lstk aws`. ```bash -awslocal s3 mb s3://testbucket +lstk aws s3 mb s3://testbucket ``` Upload some sample CSV file into the S3 bucket using the following command: ```bash -awslocal s3 cp file.csv s3://testbucket +lstk aws s3 cp file.csv s3://testbucket ``` ### Create a Storage Integration diff --git a/src/content/docs/snowflake/integrations/airflow.md b/src/content/docs/snowflake/integrations/airflow.md index 6b0ecd973..a75aa80a3 100644 --- a/src/content/docs/snowflake/integrations/airflow.md +++ b/src/content/docs/snowflake/integrations/airflow.md @@ -13,11 +13,11 @@ On this page we outline how to set up the connection between local Airflow and t ## Create an Airflow environment via MWAA in LocalStack -In order to create an Airflow environment in local MWAA, we can use the [`awslocal`](https://github.com/localstack/awscli-local) command: +In order to create an Airflow environment in local MWAA, we can use the [`lstk aws`](/aws/developer-tools/running-localstack/lstk/#aws) command: ```bash showLineNumbers -awslocal s3 mb s3://my-mwaa-bucket -awslocal mwaa create-environment --dag-s3-path /dags \ +lstk aws s3 mb s3://my-mwaa-bucket +lstk aws mwaa create-environment --dag-s3-path /dags \ --execution-role-arn arn:aws:iam::000000000000:role/airflow-role \ --network-configuration {} \ --source-bucket-arn arn:aws:s3:::my-mwaa-bucket \ @@ -141,7 +141,7 @@ In a future release, we're looking to integrate these patches directly into the Next, we copy the `my_dag.py` file to the `/dags` folder within the `my-mwaa-bucket` S3 bucket, to trigger the deployment of the DAG in Airflow: ```bash -awslocal s3 cp my_dag.py s3://my-mwaa-bucket/dags/ +lstk aws s3 cp my_dag.py s3://my-mwaa-bucket/dags/ ``` You should then be able to open the Airflow UI (e.g., http://localhost.localstack.cloud:4510/dags) to view the status of the DAG and trigger a DAG run. diff --git a/src/content/docs/snowflake/tutorials/aws-lambda-localstack-snowpark.md b/src/content/docs/snowflake/tutorials/aws-lambda-localstack-snowpark.md index a778de0eb..9be05690d 100644 --- a/src/content/docs/snowflake/tutorials/aws-lambda-localstack-snowpark.md +++ b/src/content/docs/snowflake/tutorials/aws-lambda-localstack-snowpark.md @@ -21,7 +21,7 @@ The code in this tutorial is available on [GitHub](https://github.com/localstack - [`lstk`](/snowflake/getting-started/) with a [`LOCALSTACK_AUTH_TOKEN`](/snowflake/getting-started/auth-token/) - [LocalStack for Snowflake](/snowflake/getting-started/) -- [AWS CLI](https://docs.aws.amazon.com/cli/latest/userguide/install-cliv2.html) & [`awslocal` wrapper](/aws/connecting/aws-cli/#localstack-aws-cli-awslocal) +- [AWS CLI](https://docs.aws.amazon.com/cli/latest/userguide/install-cliv2.html) & [`lstk aws`](/aws/developer-tools/running-localstack/lstk/#aws) command - Python 3.10 installed locally ## Create the Lambda function @@ -150,10 +150,10 @@ lstk start --type snowflake ## Deploy the Lambda function -You can now deploy the Lambda function to LocalStack using the `awslocal` CLI. Run the following command: +You can now deploy the Lambda function to LocalStack using `lstk aws`. Run the following command: ```bash showLineNumbers -awslocal lambda create-function \ +lstk aws lambda create-function \ --function-name localstack-snowflake-lambda-example \ --runtime python3.10 \ --timeout 180 \ @@ -162,10 +162,10 @@ awslocal lambda create-function \ --role arn:aws:iam::000000000000:role/lambda-role ``` -After successfully deploying the Lambda function, you will receive a response with the details of the function. You can now invoke the function using the `awslocal` CLI: +After successfully deploying the Lambda function, you will receive a response with the details of the function. You can now invoke the function using `lstk aws`: ```bash showLineNumbers -awslocal lambda invoke --function-name localstack-snowflake-lambda-example \ +lstk aws lambda invoke --function-name localstack-snowflake-lambda-example \ --cli-binary-format raw-in-base64-out \ --payload '{"body": "test"}' output.txt ``` diff --git a/src/content/docs/snowflake/tutorials/credit-scoring-with-localstack-snowpark.md b/src/content/docs/snowflake/tutorials/credit-scoring-with-localstack-snowpark.md index dcf67b46f..dea5f476b 100644 --- a/src/content/docs/snowflake/tutorials/credit-scoring-with-localstack-snowpark.md +++ b/src/content/docs/snowflake/tutorials/credit-scoring-with-localstack-snowpark.md @@ -27,7 +27,7 @@ Start your LocalStack container in your preferred terminal/shell. ```bash export LOCALSTACK_AUTH_TOKEN= -lstk start --type snowflake +lstk start ``` ## Create a Snowpark session diff --git a/src/content/docs/snowflake/tutorials/s3-tables-iceberg-integration.md b/src/content/docs/snowflake/tutorials/s3-tables-iceberg-integration.md index 0e4d8b231..85494db9d 100644 --- a/src/content/docs/snowflake/tutorials/s3-tables-iceberg-integration.md +++ b/src/content/docs/snowflake/tutorials/s3-tables-iceberg-integration.md @@ -20,7 +20,7 @@ With LocalStack's Snowflake emulator, you can create catalog integrations that c - [`lstk`](/snowflake/getting-started/) with a [`LOCALSTACK_AUTH_TOKEN`](/snowflake/getting-started/auth-token/) - [LocalStack for Snowflake](/snowflake/getting-started/) -- [AWS CLI](https://docs.aws.amazon.com/cli/latest/userguide/install-cliv2.html) & [`awslocal` wrapper](/aws/connecting/aws-cli/#localstack-aws-cli-awslocal) +- [AWS CLI](https://docs.aws.amazon.com/cli/latest/userguide/install-cliv2.html) & [`lstk aws`](/aws/developer-tools/running-localstack/lstk/#aws) command - Python 3.10+ with `pyiceberg` and `pyarrow` installed ## Start LocalStack @@ -29,7 +29,7 @@ Start your LocalStack container with the Snowflake emulator enabled. ```bash export LOCALSTACK_AUTH_TOKEN= -lstk start --type snowflake +lstk start ``` ## Create S3 Tables resources @@ -41,7 +41,7 @@ Before configuring Snowflake, you need to create S3 Tables resources using the A Create a table bucket to store your Iceberg tables. ```bash -awslocal s3tables create-table-bucket --name my-table-bucket +lstk aws s3tables create-table-bucket --name my-table-bucket ``` ```bash title="Output" @@ -55,7 +55,7 @@ awslocal s3tables create-table-bucket --name my-table-bucket Create a namespace within the table bucket to organize your tables. ```bash -awslocal s3tables create-namespace \ +lstk aws s3tables create-namespace \ --table-bucket-arn arn:aws:s3tables:us-east-1:000000000000:bucket/my-table-bucket \ --namespace my_namespace ``` From 851056f176bae852824e8aaf5e208f243f672639 Mon Sep 17 00:00:00 2001 From: Quetzalli Date: Mon, 7 Sep 2026 09:42:21 +0200 Subject: [PATCH 3/3] DOC-428: Fix remaining stale single-page lstk anchors post-merge Two links in configuration.md still pointed at the old /aws/developer-tools/running-localstack/lstk#... single-page anchors, missed by the merge conflict resolution since this file wasn't part of the conflicting set. Point them at the post-split configuration/ subpage, matching the pattern already used in aws/customization/configuration-options.md. --- src/content/docs/snowflake/capabilities/configuration.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/content/docs/snowflake/capabilities/configuration.md b/src/content/docs/snowflake/capabilities/configuration.md index 41bd4875d..42fd4ae71 100644 --- a/src/content/docs/snowflake/capabilities/configuration.md +++ b/src/content/docs/snowflake/capabilities/configuration.md @@ -30,7 +30,7 @@ DEBUG = "1" lstk start ``` -See [Passing environment variables to the container](/aws/developer-tools/running-localstack/lstk#passing-environment-variables-to-the-container) for details. +See [Passing environment variables to the container](/aws/developer-tools/running-localstack/lstk/configuration/#passing-environment-variables-to-the-container) for details. ## Core @@ -120,7 +120,7 @@ For more general guidance on adding trusted certificates to LocalStack, see [Cus ## CLI `lstk` is configured through its config file rather than through environment variables. -See [Configuration](/aws/developer-tools/running-localstack/lstk#configuration) on the `lstk` page for the config file search order, the field reference, and how to define named environment profiles. +See [Configuration](/aws/developer-tools/running-localstack/lstk/configuration/) on the `lstk` page for the config file search order, the field reference, and how to define named environment profiles. ## Docker