Skip to content

Instantly share code, notes, and snippets.

@umihico
Last active September 3, 2019 01:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save umihico/16d1e8cd96b0bd1456138dd31fe1dd3c to your computer and use it in GitHub Desktop.
Save umihico/16d1e8cd96b0bd1456138dd31fe1dd3c to your computer and use it in GitHub Desktop.
Download Python Pillow package for AWS lambda
  1. run docker-compose up.
  2. confirm you get PIL and Pillow-6.1.0.dist-info directory next .yml file.
  3. upload them as AWS Lambda Layer
version: '3'
services:
app:
image: amazonlinux:latest
volumes:
- './:/app'
command: sh -c "yum install python3 zip -y;mkdir -p /app/pillow_dist;pip3 install pillow -t /app/pillow_dist;cd /app/pillow_dist;zip -r /app/pillow.zip *"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment