JackySan
Grand Guru
- Joined
- Dec 11, 2018
- Messages
- 379
Hey,
I've seen quite a lot of people interested in using cloudfront these last few days on the forum.
I was wondering why one would use s3+cloudfront instead of s3+cloudflare?
Especially with POP/Push, your traffic volume gets high very quickly, you can easily end up paying $500+ per month (I've seen it)
Cloudflare on the other hand is ALWAYS free - 100% free unless you want some of their premium features like phone support. It comes with free SSL as well.
Not only that, but Cloudflare also has more edge points around the world than Amazon's Cloudfront, so your visitors will likely get your data from a server closer to them when using Cloudflare:
Setting it up with S3 buckets is super easy - I just made a quick test and it worked immediately.
Here's how to do it (I'm only giving you a general overview here, if you're not familiar with cloudflare, Google each step for more details):
1/ Purchase a domain name and set the DNS records to use Cloudflare's DNS (if you use namecheap, they have a tutorial)
2/ In your S3 account, create a bucket files.yourdomain.com (replace yourdomain.com)
3/ In S3, enable the public READ permissions for that bucket
4/ In Cloudflare, go to the DNS tab, and add a CNAME record like this:
Then click "Add Record"
That's ALL!
From now, when you will access https://files.yourdomain.com it will access your S3 bucket at files.yourdomain.com.s3.amazonaws.com!
And https://files.yourdomain.com/any-file-name will access files.yourdomain.com.s3.amazonaws.com/any-file-name
I told you it was easy
I've seen quite a lot of people interested in using cloudfront these last few days on the forum.
I was wondering why one would use s3+cloudfront instead of s3+cloudflare?
cloudflare vs cloudfront
Cloudfront is free for the 1st year only, then depending on your traffic volume, your monthly bill may become pretty high.Especially with POP/Push, your traffic volume gets high very quickly, you can easily end up paying $500+ per month (I've seen it)
Cloudflare on the other hand is ALWAYS free - 100% free unless you want some of their premium features like phone support. It comes with free SSL as well.
Not only that, but Cloudflare also has more edge points around the world than Amazon's Cloudfront, so your visitors will likely get your data from a server closer to them when using Cloudflare:
Setting it up with S3 buckets is super easy - I just made a quick test and it worked immediately.
Here's how to do it (I'm only giving you a general overview here, if you're not familiar with cloudflare, Google each step for more details):
1/ Purchase a domain name and set the DNS records to use Cloudflare's DNS (if you use namecheap, they have a tutorial)
2/ In your S3 account, create a bucket files.yourdomain.com (replace yourdomain.com)
3/ In S3, enable the public READ permissions for that bucket
4/ In Cloudflare, go to the DNS tab, and add a CNAME record like this:
Then click "Add Record"
That's ALL!
From now, when you will access https://files.yourdomain.com it will access your S3 bucket at files.yourdomain.com.s3.amazonaws.com!
And https://files.yourdomain.com/any-file-name will access files.yourdomain.com.s3.amazonaws.com/any-file-name
I told you it was easy
Last edited by a moderator: