Request processing workflow
Lambda processing steps:
-
API Gateway receives image transformation request
-
Request parameters are validated and parsed
-
Lambda function is invoked with transformation parameters
-
Original image is fetched from S3 bucket
-
Sharp library applies transformations (resize, crop, format conversion, etc.)
-
Processed image is returned through API Gateway
-
CloudFront caches the processed image for future requests
Supported transformations: - Resize with various fit options (cover, contain, fill, inside, outside) - Crop with precise coordinates or smart cropping using Amazon Rekognition - Format conversion ("jpg", "jpeg", "heic", "png", "raw", "tiff", "webp", "gif", "avif") - Quality optimization and compression - Rotation and flip operations - Watermarking and overlay effects - Content moderation using Amazon Rekognition