Optimizing Image Processing in AWS Lambda: A Deep Dive into Using ImageMagick with Docker

I this post I’m showing what I learned and the end code for generating optimized thumbnails for images uploaded to an S3 bucket.

Tech stack: python, docker, aws lamba, terraform

The project demanded support for a range of image formats beyond the standard ones like PNG, JPG, GIF, and WebP. Therefore, Pillow, a common simple to use python imaging library, was not suitable for the requeriments.

Enter ImageMagick, the open-source library renowned for its extensive support of file formats, making it the ideal tool for our requirements.