Explore Courses Blog Tutorials Interview Questions
0 votes
in AWS by (19.1k points)

I'm trying to create an AWS lambda function in order to create a thumbnail of my uploaded images. My script is running well locally, I followed this tutorial to deploy my function but I have a problem with the Pillow library, indeed when I'm testing my function I can see this following log :


1 Answer

0 votes
by (44.4k points)

Include in your lambda package, but also some changes are required in the file. Assuming If you do this “pip install module-name -t”, do this:

cd into/your/local/lambda/package/dir

cp -L $(ldd PIL/|grep libjpeg|awk '{print $3}') PIL/

patchelf --set-rpath PIL PIL/

# zip, deploy and test the package

This script works for Pillow version 3.2.0.

Related questions

0 votes
1 answer

Want to get 50% Hike on your Salary?

Learn how we helped 50,000+ professionals like you !

0 votes
1 answer

Browse Categories