Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

No module named 'snappy._snappy_cffi' on AWS lambda

Open
#121 5 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
30/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
aws, python
Domain
cloud

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

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from intake/python-snappy

All issues in intake/python-snappy

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.