Writing Lambda at Edge function

Background Few months ago (less than 3), I’ve switched my website from Wordpress to Hugo. There I described the process of setting up Cloudfront distribution to serve as a CDN and a simple web-server for the content backed by S3 bucket. One of the challenges was how to serve nested paths (eg. /about-me/) as Cloudfront doesn’t know for “directory index” concept. You can only set index for / uri. To tackle that issue, I’ve used Lambda@Edge function called standard-redirects-for-cloudfront I’ve found on the internet....

April 30, 2021 · 2 min · Ivan Tomica