Point cloudflare to s3 bucket (not website endpoint)

367 Views Asked by At

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.

1

There are 1 best solutions below

0
On

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.