Include libjpeg.so 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/_imaging.so|grep libjpeg|awk '{print $3}') PIL/
patchelf --set-rpath PIL PIL/_imaging.so
# zip, deploy and test the package
This script works for Pillow version 3.2.0.