5

I see in Amazon CloudFront FAQ, the file size limit is 20 GB.

I plan to provide downloads in 10-30 MB filesize, in case the result is bad after the coding is completed, just hope to know --- is CloudFront capable for files in 10-30 MB filesize?

Or I should use Amazon S3 for download?

Thank you very much.

1
  • Worth adding that the maximum size of a file that can be delivered through Amazon CloudFront is now 30GB (not 20GB), as of 25 May 2021. Source: aws.amazon.com/blogs/aws/…
    – TheArchDev
    Apr 16, 2022 at 14:14

2 Answers 2

6

Of course you could use Cloud Front for files up to 20 GB.

What comes out better depends always on your situation. Generally speaking, using Cloud Front makes sense where speed of access matters, and for most scenarios this will be for small files like static resources for your webpage. With a large file, the user will not likely notice whether it's being pulled from S3 or Cloud Front edge location close to him.

Another important aspect is the price. With Cloud Front your costs multiply, again depending on how many downloads your users generate, and how are they spread out geographically.

My recommendation for you is staying with S3, unless there is some very specific requirement, you have not mentioned.

3
  • MAximum file size served by CloudFront is 20 Gb (aws.amazon.com/cloudfront/faqs) Oct 14, 2014 at 13:53
  • 2
    Sorry Michal, this is how SO works when incorrect answers are provided (your answer said : "there is no technical limitation" which was incorrect - hence my downvote). Your answer has been edited since and is correct now - thank you for having corrected it. Also, your last statement is incorrect. CloudFront is actually a good solution for many normal usages of S3, when it comes to distribute content over HTTP. CLoudFront distributions will allow your customers to fetch your content from edge caches that are close to them (in terms of network latency) Oct 15, 2014 at 14:50
  • 1
    I think using CloudFront for 10-30MB files makes total sense, not just for small static files. Fetching 30MB from a server 500 miles away is absolutely going to be faster than downloading 30MB from 10,000 miles away. Apr 13, 2015 at 20:38
2

Always go with CloudFront (CF), especially if you operate in North America or/and Europe.

I've personally never had an edge case, only one I can think of right now is that if you're very price sensitive & you operate in Asia or/and South America which have higher CF data transfer prices.


Why should you prefer CF?

  • Data transfer from S3 to CloudFront is free, I think this used to be a big cost
  • S3 is in a single geographical region, CF is global, closer to user, faster
  • It's possible to "overwhelm" S3 bucket, CF is practically infinite scale
  • CF has built-in features to prevent/protect them & you from many types of attacks
  • CF is optimized for low latency and high speed with real-world latency measurements

Where do you operate?

North America or/and Europe:

Data transfer is cheaper than S3 which basically cancels out all extra costs from CF.

South America or/and Asia:

It's more expensive. CF data transfer prices are roughly 2x more expensive on average.

Any kind of combination or all:

Create an example scienario, take a look at the prices & do the math. It's probably going to be more expensive but like I listed above: CloudFront has many very important advantages.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.