Resizing Images

Length: 00:13:00

Lesson Summary:

In this video, we'll go over how to create a Lambda function that will automatically resize images uploaded to an S3 bucket.

Pillow - Python Imaging Library (Fork)

https://pypi.org/project/Pillow/

Download the Pillow-5.4.1-cp37-cp37m-manylinux1_x86_64.whl file, and extract the wheel file in the same folder as lambda_handler.py:

unzip Pillow-5.4.1-cp37-cp37m-manylinux1_x86_64.whl

The Pillow-5.4.1.dist-info isn't needed:

rm -rf Pillow-5.4.1.dist-info

Zip the PIL directory along with lambda_handler.py:

zip -r9 lambda.zip PIL lambda_handler.py

Upload lambda.zip to AWS Lambda.


This lesson is only available to Linux Academy members.

Sign Up To View This Lesson
Or Log In

Looking For Team Training?

Learn More