I will be hosting a static web site on S3. The problem is that the web engine behind S3-as-a-web-server does not transform http://example.com/hello/
into http://example.com/hello/index.html
.
When configuring the web site, there is a provision for the root document (the one which will be displayed when calling http://example.com
), but not any deeper URLS (such as my example).
Is it possible to use the redirect rules to achieve that?
I actually have a solution for this problem, but is is really convoluted:
- host the web site on an S3 bucket
- deploy a CloudFront instance which origins in that bucket
- use a Lambda@Edge which will rewrite the call once it hits CloudFront
I hope there is something more straightforward (I have hope in the redirect rules, though "redirect" suggests that something was already attained, which is not the case in my problem as S3 does not seem to understand what http://example.com/hello/
is.