3 ms·
> The redirect logic provided by the S3 website endpoint can be moved to a Lambda@Edge function. The post here is using Lambda@Edge to handle pointing example.
by philfreo 7y ago
> The redirect logic provided by the S3 website endpoint can be moved to a Lambda@Edge function.
The post here is using Lambda@Edge to handle pointing example.com/about/ to example.com/about/index.html
However there's a lot more you can do / may want to do with Lambda@Edge if you're hosting a Cloudfront+S3 website.
I just wrote up how I set up a system to make managing server-side redirects (e.g. 301s from /old-page to /new-page) easier via Lambda@Edge.
https://news.ycombinator.com/item?id=22351484 https://news.ycombinator.com/item?id=22351484
https://engineering.close.com/posts/redirects-using-cloudfront-lambda-edge https://engineering.close.com/posts/redirects-using-cloudfro...
- jillesvangurp 7y agoI did some redirects without lambda's last year using s3 routing rules, which kind of worked. As figuring out this and several other things, I also wrote up some details on this. https://dev.to/jillesvangurp/using-cloudfront-s3-and-route-53-for-hosting-395o https://dev.to/jillesvangurp/using-cloudfront-s3-and-route-5... IMHO, Amazon should be ashamed of themselves for making it so unbelievably convoluted and hard to host a simple website on cloudfront. It's the one thing almost every website out there has to solve and they made it super painful to get this right.