I've heard about quite a lot of people interested in using Cloudfront these last few days to host their affiliate landing pages.
I was wondering why one would use Amazon S3 + Cloudfront instead of S3 + Cloudflare?
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 traffic, your traffic volume gets high very quickly, you can 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 (click to zoom):
Then click "Add Record"
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 🙂