Hacker News new | past | comments | ask | show | jobs | submit login

> 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://engineering.close.com/posts/redirects-using-cloudfro...




I 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-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.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: