Pillow==4.1.1
compiled to be usable with AWS Lambda- Python scripts for the actual compression
- Understand what is Lambda and how to use it: Getting Started with AWS Lambda. Also check out how to work with Python on AWS Lambda: Packaging for Lambda
- Go through the architecture in the accompanying blog: Leveraging AWS Lambda for Image Compression at scale
- Deploy
orchestrator.py
andimage_compress.py
using AWS Lambda. - Invoke the lambda for
orchestrator
with a payload like:
{
"key_urls_map": {
"image1.jpg": "https://media.licdn.com/media/p/8/005/05b/1fb/0cf50ca.png",
"image2.jpg": "https://media.licdn.com/media/p/8/005/05b/1fb/0cf50ca.png"
},
"quality": 90,
"bucket_name": "compression-test-bucket"
}
- Check your S3 bucket for the compressed images^