Traditionally, I used s3 website endpoints, but is there a way to point cloudflare to an s3 bucket (s3.amazonaws.com/<bucket-name>/index.html
) instead? One of the requirements I have is to use SSL on the origin, and this seems to be the only way.
I have no problem doing this with cloudfront by configuring the root object. However, I'm not sure if that's an aws-specific feature. It would be great to accomplish this by using cloudflare as well.
You should be able to do it, assuming hte objects are publicly readable. From some cursory tests, I have concluded that the public S3 https endpoint works independently from the hosted website thing ( which , I suppose, is really more of a virtual host mapping to the bucket than anything else)
The URL is indeed of the form https://s3.amazonaws.com/bucket/object-key and the objects have to be public.