Amazon CloudFront is the CDN element of Amazon Web Services (AWS), the company's massive collection of cloud computing platforms.
CloudFront currently uses a large global network of 215 edge locations spread across 89 cities in 46 countries. That's not just a sizeable network, it's also well distributed all around the world. Although North America and Europe get the most coverage, CloudFront also has 57 locations in Asia, 9 in Oceania, 7 in South America, 4 in the Middle East, 4 in China and 3 in Africa.
It doesn't stop there. CloudFront also has 12 regional edge caches. If someone tries to view your content and it's not cached at the closest edge location, CloudFront checks the regional cache next, reducing the chance that it'll have to go back to your origin server.
- Want to try Amazon CloudFront? Check out the website here
The service handles all the file and content types you'll need, from simple static objects to complex dynamic items, while support for Gzip, Brotli compression and other smart data handling tricks help to optimize website speeds.
If you're looking for video streaming or VOD then you could browse the service specs, where you'll find support for multiple formats, including Microsoft Smooth, HLS, HDS, and MPEG-DASH. Or if you're not the technical type, just look at the customer list: CloudFront handles video delivery tasks for Hulu, PBS and Amazon's own Prime Video, amongst many others.
This isn't just about the CDN, of course. Deep integration with Amazon Web Services means you can also plug in any of the regular AWS features, many of which are industry standards all on their own.
Most CDNs offer cloud storage, for instance, but how is it implemented? It's usually less than clear. With Amazon, there's no need to wonder. You can plug in data from your existing Amazon S3 plan (the company's scalable object storage platform) and transfer data to CloudFront at no extra charge.
Maybe you have to create and deploy a large number of custom SSL certificates? No problem, the AWS Certificate Manager handles this with ease, at no extra cost.
Elsewhere, built-in protection from AWS Web Application Firewall helps protect you from common exploits, AWS Shield keeps you safe from common types of DDoS attacks, and everything is managed from the regular AWS console.
If you're unsure whether CloudFront is right for you, or you're a total newcomer to CDNs, there’s some good news: a Free Usage Tier gives new AWS customers 50GB of traffic each month, for one year. That's perfect for running initial tests and understanding what CloudFront and CDNs might be able to do for you.
After the free tier, there are no fixed contracts; you pay for what you use. Sounds simple, right? But, well, it really isn't.
While providers like MaxCDN and KeyCDN charge a flat rate for delivering data to any region, for instance, CloudFront prices vary from a starting $0.085 to the US and Europe, rising to $0.17 in India. (If you're on a budget you can choose not to serve content from the more expensive locations.)
These prices are for the first 10TB. You can save money as you use more bandwidth, down to $0.02 per GB in the US (though only for traffic above 5 petabytes), and Amazon also offers discounts to customers who commit to use a certain amount of traffic (10TB a month or more.)
You're also charged for requests (from $0.0075 per 10,000), and the figure varies depending on whether it's HTTP or HTTPS. Even tech support beyond the website and customer service costs extra (from $29 a month.)
Amazon helps out a little by providing a Simple Monthly Calculator. Choose CloudFront in the left-hand sidebar, select a site which most closely matches yours in the right sidebar (choose Marketing Website is you're unsure) and it provides an estimate of likely charges.
Figuring out what this means for you isn't easy. CloudFront generally offers fair value for what you get, though, but if your needs are more basic, some providers can be notably cheaper. Fastly's US traffic charges start at $0.12 per GB, for instance, compared to $0.085 for CloudFront, and just $0.01 for Bunny (which doesn't charge extra for requests, either.)
Signing up for CloudFront couldn't be much easier. Amazon's initial free tier means there's no need to hand over payment details or enter much in the way of personal information. Just enter your name and email address, choose a password, accept the default Basic support plan and you're done.
The AWS console opens with a huge list of its many products and platforms, but searching for CloudFront provided a link to the service dashboard.
This opened with a prompt to create a 'Distribution', the equivalent of a 'zone' with other CDNs, a group of settings which defines where your content is stored, how it's handled by Amazon and accessed by your users.
The user-friendliness seems to disappear the moment you hit the Create Distribution button, and a form appears covering more than 30 options, many of those with further options of their own. But don't panic, it's not nearly as bad as it seems.
If you're a newbie, or just in a hurry, you can ignore all but one of the options. Type your domain name or S3 bucket in the Origin Domain Name box, hit Enter, and you can choose to create your distribution right away.
If you're more experienced, or just looking to learn, it's worth taking the time to browse the various settings. Many are similar to other CDNs (Origin Shield support reduces the load on your server); almost all have tooltip-sized descriptions to give you a basic idea what they're about, and the most complex items usually have a 'Learn more' link which opens a page on the support site with the full details.
The end result can still often be complicated, and there's a lot to learn. But that's only because CloudFront has a huge number of features, and given all that functionality, Amazon does a good job of making it as manageable as possible.
Distribution created, you could start work on integrating it with your website, and here, too, CloudFront has an array of documents, manuals, tutorials and more to help point you in the right direction.
We don't have the space to begin going through the possibilities here, but as a single example, take a look at this blog post on How to Accelerate Your WordPress Site with Amazon CloudFront. While many CDNs get away with a line or two, maybe a link to a WordPress plugin, this is 3,000 words of detailed guidance and explanation, more like the content you'd expect from a paid course.
Once you're up and running, CloudFront's detailed analytics are a highlight. It's easy to view CloudFront requests and data transfer usage by date, billing region and more. There are charts to show popular objects, top referrers, and basic details on your visitors: browser, device type, OS and location. You can even set up customizable alarms to warn you when metric data hits some level you define, such as "data transfer usage is greater than X – potentially very handy in a pay-for-usage product.
Put it all together and there's a lot to like about the CloudFront control panel. CDN beginners will find it intimidating, at least initially, but there is detailed help available. If you're experienced at creating and managing a website, you should be able to master the CloudFront basics in just a few hours.
Figuring out which is the fastest CDN is a real challenge, as there's no one simple answer. Performance varies based on location, and every website has its own mix of visitors – what's best for Europe and Japan won't necessarily work for America or India.
CDNPerf provides a good starting point for any evaluation by interpreting real user monitoring data (via cedexis) covering billions of tests.
As we write, CloudFront rates third place worldwide out of 20 contenders, with an average response time of 28ms (only 5centsCDN and Google Cloud did better, and even they were only a couple of milliseconds faster.)
Global averages don't tell the full story, and CloudFront performance does vary between regions. Asia and Africa were the lowlights, with CloudFront ranking 7th place in both. That's still better than most, though, and its second place in South America is a real highlight. (Most CDNs have poor South American coverage if they have any at all, yet CloudFront's average response time was less than half that of big names like KeyCDN, G-Core Labs and CDN77.)
Amazon CloudFront is more expensive than some, with a complicated pricing scheme, and it's not the easiest to set up. But it's also fast, highly configurable, and stuffed with high-end features, and if you've a demanding project which needs real power then CloudFront is hard to beat.
- We've also highlighted the best CDN