Cloudfront with Image Optimization

This blog is built with Hugo, and served by GitHub Pages.

All static images are uploaded to AWS S3, and served by another domain, This CDN domain maps to AWS Cloudfront:

  1. Client ->
  2. Cloudfront triggers AWS Lambda Function to convert original images to specified format
  3. Transformed images are stored in another S3 Bucket imgtransformationstack-s3transformedimagebucket6d-fjwwbg2y69cf

For more information, please check AWS CDK Sample and AWS CloudFormation.