-
Notifications
You must be signed in to change notification settings - Fork 152
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SNOW-358871: Does not work in AWS lambda - Dead on Arrival #225
Comments
I saw this issue because I was working on the same exact work. I just want to note that if you are building python packages for lambda, you have to install and zip up the packages on the same OS as lambda. If you do it on OSX for example, it will not have the proper header files to run in an AWS linux AMI for example. |
The packages were zipped up on Amazon Linux 2 - the same that is used by lambda. |
Any updates on this issue? Exact same behavior as reported by @imperialguy when creating a Lambda Layer running on AWS Lambda Python3.8 runtime |
It is working for me with lambda runtime Python3.9 if I build the layer inside a container using image public.ecr.aws/sam/build-python3.9:latest-x86_64. |
I can confirm this is working with Python 3.9, I wasn't able to make it work with 3.8 |
marking this as closed as it seems to be resolved - if still further troubleshooting needed, do comment please and i can reopen |
Please answer these questions before submitting your issue. Thanks!
What version of Python are you using (
python --version
)? 3.7 or 3.8What operating system and processor architecture are you using (
python -c 'import platform; print(platform.platform())'
)? AWS lambda amazon linux 2What are the component versions in the environment (
pip list
)?What did you do?
Step 1: Install
snowflake-sqlalchemy
as an AWS lambda layer.Step 2: Create a sample lambda function with the following code. Add the above layer to it and run the function.
What did you expect to see?
I expect to see "hello world" and the AWS lambda function executed without any issue
What did you see instead?
Not sure how the logging works on AWS lambda as per your below suggestion. I tried, but it didn't work.
If you remove the line
import snowflake.sqlalchemy
and replace it with (say)import snowflake.connector
, it works fine. So, that tells me that the problem is not with the whole layer, which comprises several libraries likesqlalchemy
,snowflake-connector
etc., but it is specifically withsnowflake-sqlalchemy
package only.The text was updated successfully, but these errors were encountered: