No module named 'snappy._snappy_cffi' on AWS lambda
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 30/100
Research direction
Start with the import in lambda_function.py and the AWS Lambda packaging tutorial linked in the issue. Review issue #52 for the native libsnappy dependency and compare the deployment package contents; done means the packaged function imports snappy successfully on Lambda.
Written by the indexing model from the issue text.
Description
I create a function using python-snappy to deploy on AWS Lambda. I followed this tutorial and basically did the following (TL;DR of the tutorial commands):
pip install --target ./package python-snappy
cd package
zip -r ../my-deployment-package.zip .
cd ..
zip -g my-deployment-package.zip lambda_function.py
When running my function it fails on import snappy line with:
Response
{
"errorMessage": "Unable to import module 'lambda_function': No module named 'snappy._snappy_cffi'",
"errorType": "Runtime.ImportModuleError",
"stackTrace": []
}
My function file tree looks like the following:
my-function
--| python_snappy_0.6.1.dist-info
---- AUTHORS
---- INSTALLERS
---- <Rest of files>
--| snappy
---- __init__.py
---- __main__.py
---- <Rest of files
-- lambda_function.py
I looked at issue #52 (That was mentioned in another similiar issue to have solved the problem) but I'm not sure how to create the libsnappy.so.1 file (using mac M1 if it's relevant) or if there's another way to solve this issue.
- Dominant language
- Python
- Stars
- 490
- Forks
- 104
- PR merge metrics
- No merged PRs in 30d
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from intake/python-snappy
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
intake/python-snappy#152 · 3 comments ·
-
Difficulty 5/5 Over a week Newbie friendliness 35/100
intake/python-snappy#151 · 1 comment ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 45/100
intake/python-snappy#150 · 2 comments ·
-
Difficulty 4/5 3-5 days Newbie friendliness 25/100
intake/python-snappy#147 · 3 comments ·
-
Difficulty 4/5 3-5 days Newbie friendliness 25/100
intake/python-snappy#140 · 1 comment · 1 reaction ·
All issues in intake/python-snappy
Similar issues
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 90/100
learningequality/ricecooker#747 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
BSData/horus-heresy-3rd-edition#3171 ·
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
run-llama/llama_index#23199 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
KhronosGroup/glTF-Blender-IO#2769 ·