squadrun / lambda-image-compression

18 stars 9 forks source link

How did you get pillow to work on AWS Lambda? #1

Open bootrino opened 6 years ago

bootrino commented 6 years ago

Hi there

I have tried pillow on aws lambda using your sites-packages and it seems to work.

I have not succeeded to package up pillow to work on aws lambda.

Can you say how you packaged pillow up? It would be a huge help if you could share how you did it.

thanks!

ketanbhatt commented 5 years ago

Hey @bootrino, sorry for the late reply.

I had written a blog post about our work here: https://ketanbhatt.com/2017/09/17/leveraging-aws-lambda-for-image-compression-at-scale/

Copying from the post:

Giveaways

It was straightforward to set up PIL for AWS Lambda, you just have to follow the provided docs really well. Fire up an EC2, with Amazon’s Linux image, and install Pillow, and then package this in a zip and download it. See?

No worries, we took the pain so you don’t have to. You can find the site packages zip along with the image compression and the orchestrator Lambda functions here in our repository.

I hope this helps.