I've been struggling to get pdfplumber working on AWS Lambda. At first, I tried uploading all my dependencies in a zip file, but I ran into compatibility issues with Windows dependencies. So, I switched to using WSL and attempted to upload the dependencies both as a standard zip and through a Lambda layer. Unfortunately, both methods resulted in errors indicating that certain versions of `GLIBC` required by the `cryptography` package are missing. I was told that GLIBC 2.28 is necessary and that I should switch to using Docker. Is anyone here able to run pdfplumber without Docker? Just to clarify, I did manage to fix the issue after some debugging and found that using Python 3.13 is compatible as of November 2024, which cleared up a lot of confusion. After updating my runtime environment and adjusting some IAM policies, everything works now!
3 Answers
Make sure you're using Python 3.12 or later because earlier runtimes might not support the packages from pip. Here’s a little tip: when installing, set the architecture for your Lambda function. Use `pip install` with the `--platform` and `--only-binary` options to ensure you get the right binaries, especially for something like cryptography.
You might actually get it working with a Lambda layer! It can help package everything you need without dealing with the Docker complexity.
Consider building a Docker image instead. This way, you can customize your libc version while still deploying on Lambda. The problem is likely that your current Lambda runtime doesn't support the libc version you need, so switching runtimes or adjusting your dependencies could really help.
Related Questions
Set Wordpress Featured Image Using Javascript
How To Fix PHP Random Being The Same
Why no WebP Support with Wordpress
Replace Wordpress Cron With Linux Cron
Customize Yoast Canonical URL Programmatically
[Centos] Delete All Files And Folders That Contain a String