Cloudfront with Image Optimization
Cloudfront with Image Optimization
December 11, 2022
This blog is built with Hugo, and served by GitHub Pages.
All static images are uploaded to AWS S3, and served by another domain, https://dgvi9bqir6m5j.cloudfront.net. This CDN domain maps to AWS Cloudfront:
- Client -> https://dgvi9bqir6m5j.cloudfront.net/xxx?format=webp
- Cloudfront triggers AWS Lambda Function to convert original images to specified format
- Transformed images are stored in another S3 Bucket
imgtransformationstack-s3transformedimagebucket6d-fjwwbg2y69cf
For more information, please check AWS CDK Sample and AWS CloudFormation.