Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Module initialization error in AWS Lambda #52
I'm also running into this issue in AWS Lambda, managed to isolate it to just the snappy import.
This is an AWS Lambda function running python 3.6, with
So it looks like cffi is trying to write out that c file into the read-only directory the Lambda function gets run in, which is the source of the permission denied error.
What's especially interesting to me is I've been using snappy successfully in Lambda for a while, with an existing function that's
Actually, it looks like this isn't a bug with this library at all, rather a quirk of implementing in Lambda.
This line in the error output is the clue:
Including that library in the root of the code package deployed to Lambda solved the issue - it must be that if that's not present, cffi will try to build it itself.