sobrenome Posted March 30, 2020 Posted March 30, 2020 The Amazon S3 bucket accepts two types of URL formats to deliver the stored files: 1) bucket name as subdomain: BUCKET-NAME.s3.sa-east-1.amazonaws.com/example/example.png 2) bucket name as a folder: s3.sa-east-1.amazonaws.com/BUCKET-NAME/example/example.png IPS chose the last approach, which does not allow the use of a CNAME in Cloudflare to put it in front of Amazon S3, or even a CNAME without Cloudflare to hide Amazon URL. I would really appreciate if IPS could change the URL generated to Amazon S3 storage to be the first option (bucket name as subdomain), or ate least to give us the option to choose between them. Using Cloudflare in front Amazon can help us save a lot of money. And in some countries, Cloudflare has many more POPs than Amazon. If anyone has any other solution, I appreciate. Here follows the Cloudflare tutorial to put it on front of Amazon S3: ====== I actually just set this up - you don’t need to enable “static hosting” on a S3 bucket as long as the bucket name is the same as the FQDN; So if you want wow.example.com as the custom domain: create a bucket named exactly wow.example.com go to Cloudflare -> DNS tab and create a CNAME. Name is wow and target is wow.example.com.s3.us-east-1.amazonaws.com Note: replace us-east-1 with the region where you created your S3 bucket. AD3415E1-BA50-43F6-985D-7CD0C5F1EF13.jpeg2208×411 92 KB Now I would recommend creating a page rule that matches wow.example com/* so that you can set “cache level” to “cache everything” (also set “SSL” to “Full”) ====== https://community.cloudflare.com/t/is-it-possible-to-use-cloudflare-aws-s3-without-setting-up-s3-static-hosting/52711/13
sobrenome Posted March 30, 2020 Author Posted March 30, 2020 My bad. We can use the custom URL field to solve this issue. bfarber 1
Recommended Posts