Skip to content

Commit e02fa72

Browse files
DOC-339: Address hovaesco's technical review round
- Add the docker socket mount to both the Docker Compose and Docker CLI examples, confirmed needed same as AWS (hovaesco). - Remove the redundant "Update lstk" step right after a fresh install (hovaesco). - Rename the Docker Compose service key to localstack-snowflake for clarity, and update the "View logs" Docker Compose command to match (hovaesco/Maureen). - Add --name localstack-snowflake to the Docker CLI start command: the "docker logs -f localstack-snowflake" example didn't work without it, since no --name was set (hovaesco). - Fix the auth-token guide's lingering `lstk start --type snowflake` to plain `lstk start`, consistent with the installation guide. - Use distinguishable, realistic-looking test credentials in Local Development now that hovaesco confirmed the Python emulator has no format limitation there (Maureen's original suggestion). - Migrate the remaining two tutorials (aws-lambda-localstack-snowpark and s3-tables-iceberg-integration) from the legacy `localstack` CLI to lstk, matching the credit-scoring tutorial fixed earlier and answering hovaesco's "why only one of three" question.
1 parent a1d195a commit e02fa72

5 files changed

Lines changed: 19 additions & 22 deletions

File tree

src/content/docs/snowflake/getting-started/auth-token.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ Authentication requirements vary based on your chosen execution method.
5555
The `lstk` CLI automates the authentication lifecycle. On initial execution, it triggers a browser-based OAuth flow and stores the resulting token in your system keyring. No manual environment variable configuration is required.
5656

5757
```bash
58-
lstk start --type snowflake
58+
lstk start
5959
```
6060

6161
You can alternatively set the `LOCALSTACK_AUTH_TOKEN` environment variable in your shell session; `lstk` uses it when no keyring token is present. See [Authentication](/aws/developer-tools/running-localstack/lstk/#authentication) for the full resolution order.

src/content/docs/snowflake/getting-started/installation.mdx

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -61,12 +61,6 @@ type = "snowflake"
6161
port = "4566"
6262
```
6363

64-
### Update lstk
65-
66-
```bash
67-
lstk update
68-
```
69-
7064
For more details, see the [lstk documentation](/aws/developer-tools/running-localstack/lstk/).
7165

7266
## Container and orchestration tools
@@ -81,7 +75,7 @@ Create a `docker-compose.yml` with the following configuration:
8175

8276
```yaml showLineNumbers
8377
services:
84-
localstack:
78+
localstack-snowflake:
8579
container_name: '${LOCALSTACK_DOCKER_NAME:-localstack-snowflake}'
8680
image: localstack/snowflake
8781
ports:
@@ -95,6 +89,7 @@ services:
9589
- PERSISTENCE=${PERSISTENCE:-0}
9690
volumes:
9791
- '${LOCALSTACK_VOLUME_DIR:-./volume}:/var/lib/localstack'
92+
- '/var/run/docker.sock:/var/run/docker.sock'
9893
```
9994
10095
Execute `docker compose up` to start.
@@ -106,10 +101,12 @@ Use the Docker CLI for one-off starts or when you want to test a container confi
106101
```bash
107102
docker run \
108103
--rm -it \
104+
--name localstack-snowflake \
109105
-p 127.0.0.1:4566:4566 \
110106
-p 127.0.0.1:4510-4559:4510-4559 \
111107
-p 127.0.0.1:443:443 \
112108
-e LOCALSTACK_AUTH_TOKEN=${LOCALSTACK_AUTH_TOKEN:?} \
109+
-v /var/run/docker.sock:/var/run/docker.sock \
113110
localstack/snowflake
114111
```
115112

@@ -167,7 +164,7 @@ For `lstk` CLI diagnostics (separate from container logs), see [Logging](/aws/de
167164
<TabItem label="Docker Compose">
168165

169166
```bash
170-
docker compose logs -f localstack
167+
docker compose logs -f localstack-snowflake
171168
```
172169

173170
</TabItem>

src/content/docs/snowflake/getting-started/local-development.mdx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,9 @@ Create a connection profile that points the Snowflake CLI at your local emulator
4141
```bash
4242
snow connection add \
4343
--connection-name localstack \
44-
--user test \
45-
--password test \
46-
--account test \
44+
--user test_user \
45+
--password TestPassword1! \
46+
--account test-account \
4747
--host snowflake.localhost.localstack.cloud
4848
```
4949

@@ -64,8 +64,8 @@ snow connection test --connection localstack
6464
| Connection name | localstack |
6565
| Status | OK |
6666
| Host | snowflake.localhost.localstack.cloud |
67-
| Account | test |
68-
| User | test |
67+
| Account | test-account |
68+
| User | test_user |
6969
+--------------------------------------------------------+
7070
```
7171

src/content/docs/snowflake/tutorials/aws-lambda-localstack-snowpark.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ The code in this tutorial is available on [GitHub](https://github.com/localstack
1919

2020
## Prerequisites
2121

22-
- [`localstack` CLI](/snowflake/getting-started/installation/) with a [`LOCALSTACK_AUTH_TOKEN`](/snowflake/getting-started/auth-token/)
22+
- [`lstk`](/snowflake/getting-started/installation/) with a [`LOCALSTACK_AUTH_TOKEN`](/snowflake/getting-started/auth-token/)
2323
- [LocalStack for Snowflake](/snowflake/getting-started/)
2424
- [AWS CLI](https://docs.aws.amazon.com/cli/latest/userguide/install-cliv2.html) & [`awslocal` wrapper](/aws/connecting/aws-cli/#localstack-aws-cli-awslocal)
2525
- Python 3.10 installed locally
@@ -141,12 +141,12 @@ Start your LocalStack container in your preferred terminal/shell.
141141

142142
```bash showLineNumbers
143143
export LOCALSTACK_AUTH_TOKEN=<your_auth_token>
144-
DEBUG=1 \
145-
LAMBDA_RUNTIME_ENVIRONMENT_TIMEOUT=180 \
146-
localstack start --stack snowflake
144+
LOCALSTACK_DEBUG=1 \
145+
LOCALSTACK_LAMBDA_RUNTIME_ENVIRONMENT_TIMEOUT=180 \
146+
lstk start --type snowflake
147147
```
148148

149-
> 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.
149+
> The `LOCALSTACK_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 `LOCALSTACK_LAMBDA_RUNTIME_ENVIRONMENT_TIMEOUT` environment variable is set to increase the Lambda function's timeout to 180 seconds.
150150
151151
## Deploy the Lambda function
152152

@@ -170,7 +170,7 @@ awslocal lambda invoke --function-name localstack-snowflake-lambda-example \
170170
--payload '{"body": "test"}' output.txt
171171
```
172172

173-
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`).
173+
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`).
174174

175175
```bash
176176
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

src/content/docs/snowflake/tutorials/s3-tables-iceberg-integration.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ With LocalStack's Snowflake emulator, you can create catalog integrations that c
1818

1919
## Prerequisites
2020

21-
- [`localstack` CLI](/snowflake/getting-started/installation/) with a [`LOCALSTACK_AUTH_TOKEN`](/snowflake/getting-started/auth-token/)
21+
- [`lstk`](/snowflake/getting-started/installation/) with a [`LOCALSTACK_AUTH_TOKEN`](/snowflake/getting-started/auth-token/)
2222
- [LocalStack for Snowflake](/snowflake/getting-started/)
2323
- [AWS CLI](https://docs.aws.amazon.com/cli/latest/userguide/install-cliv2.html) & [`awslocal` wrapper](/aws/connecting/aws-cli/#localstack-aws-cli-awslocal)
2424
- Python 3.10+ with `pyiceberg` and `pyarrow` installed
@@ -29,7 +29,7 @@ Start your LocalStack container with the Snowflake emulator enabled.
2929

3030
```bash
3131
export LOCALSTACK_AUTH_TOKEN=<your_auth_token>
32-
localstack start --stack snowflake
32+
lstk start --type snowflake
3333
```
3434

3535
## Create S3 Tables resources

0 commit comments

Comments
 (0)