The detailed information is available at this link.
This Lambda function was developed to resize images stored in Amazon S3 to client-specified dimensions and deliver them in a compact, optimized format for efficient viewing.
Since WebP provides a compact image size and efficient performance, it is set as the default output format.
- 📐 Resize images dynamically to user-requested dimensions
- 🔄 Convert images to various formats, with WebP as the default
- ⚡ Optimized for low-latency performance using Lambda@Edge
- ☁️ Integrated with S3 and CloudFront for seamless delivery and caching
-
Lambda@Edge with CloudFront:
When CloudFront receives an origin response, it invokes the Lambda function to resize the image and deliver it with caching. -
Max Image Dimensions:
Images are resized to a maximum width or height of 1024px. -
Error Handling:
If an error occurs during processing, the original image is returned. -
CloudFront Caching:
Processed images are cached for 6 months to reduce latency and costs. -
Query String Parameters:
Parameter Description Example hHeight in pixels h=800wWidth in pixels w=600fFile format (extension) f=jpegqImage quality (1–100) q=80