Pillow doesn't work in lambda #7591
-
Importing pillow from a lambda layer like so: from PIL import Image Gives this error: |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
Is this helpful? It's some old AWS documentation on how to use Pillow in a lambda - https://web.archive.org/web/20210126181708/https://docs.aws.amazon.com/lambda/latest/dg/with-s3-example-deployment-pkg.html |
Beta Was this translation helpful? Give feedback.
It is not uncommon for users to come here with installation problems like this. The cause of these problems is that Pillow is not a pure Python library, but contains C code as well. The standard first thing to try is to uninstall Pillow and install it again. That may not apply in your case.
https://stackoverflow.com/questions/57197283/aws-lambda-cannot-import-name-imaging-from-pil also suggests