thumbnail-s3-lambda
AWS Lambda function that automatically generates image thumbnails on S3 upload events.
View Repository →Overview
An AWS Lambda function that listens for S3 PutObject events on a media bucket. When an image is uploaded, the function retrieves it, generates a thumbnail using Pillow, and writes it back to a thumbnails/ prefix in the same bucket — preserving the original key structure.
Purpose
To automate thumbnail generation without running dedicated image-processing infrastructure. Serverless suits this workload well: it’s event-driven, bursty, and the processing time per image is short.
Stack
- Runtime: AWS Lambda (Python 2.7)
- Trigger: S3
PutObjectevent (prefix:media/) - Image processing: Pillow
- Storage: S3 — source images and generated thumbnails in the same bucket
- Deployment: Zip upload to Lambda console