At work, I built an image resizing pipeline using AWS Lambda + S3 to address image upload performance issues.
1. Triggered when an image is uploaded to an S3 bucket
2. The Lambda function resizes the image using the Sharp library
3. Saves the result to another S3 bucket
4. Caches via CloudFront
Tip: Allocate at least 1024MB of memory to Lambda to prevent Sharp from crashing. Also, I recommend setting up Provisioned Concurrency to handle cold starts.
Performance: Processes a 3MB image down to 500KB in under 5 seconds. Costs are also low, around $2–$3 per month.