Skip to content

Commit 50ca401

Browse files
authored
fix(snowflake): repair Lambda tutorial dependency install (DOC-336) (#785)
1 parent 5af1f84 commit 50ca401

1 file changed

Lines changed: 6 additions & 3 deletions

File tree

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

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -114,11 +114,12 @@ Run the following command:
114114

115115
```bash showLineNumbers
116116
pip3 install \
117-
--platform manylinux2010_x86_64 \
117+
--platform manylinux2014_x86_64 \
118118
--implementation cp \
119+
--python-version 3.10 \
119120
--only-binary=:all: --upgrade \
120121
--target ./libs \
121-
snowflake-connector-python==2.7.9 boto3==1.26.153 botocore==1.29.153
122+
snowflake-connector-python==2.7.9 boto3==1.26.153 botocore==1.29.153
122123
```
123124

124125
## Package the Lambda function
@@ -127,6 +128,7 @@ Package the Lambda function and its dependencies into a ZIP file. Run the follow
127128

128129
```bash showLineNumbers
129130
mkdir -p build
131+
cp handler.py build/
130132
cp -r libs/* build/
131133
(cd build && zip -q -r function-py.zip .)
132134
```
@@ -164,7 +166,8 @@ After successfully deploying the Lambda function, you will receive a response wi
164166

165167
```bash showLineNumbers
166168
awslocal lambda invoke --function-name localstack-snowflake-lambda-example \
167-
--payload '{"body": "test" }' output.txt
169+
--cli-binary-format raw-in-base64-out \
170+
--payload '{"body": "test"}' output.txt
168171
```
169172

170173
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`).

0 commit comments

Comments
 (0)