4

I've been reviewing the features and prices of Amazon S3 and Amazon CloudFront as well as similar services offered by other providers. One thing I can't understand is why Amazon CloudFront pricing doesn't seem to have a cost for storage as the other CDNs I've looked at do.

I understand, my files are definitively stored on S3. S3 has storage costs. However, when I activate CloudFront, from what I understand, my files will be copied to many geographically distributed data centers. By only charging for transfer (plus requests) and not storage, it seems to me that Amazon would be hurt in a situation where a customer requires much storage but low transfer.

Since this does not seem right I want to ask: Am I correct in understanding that Amazon CloudFront does not charge for storage (above the costs of S3 storage)? And if I am correct, does Amazon have any storage limits to its CloudFront service that protect it from losing money from customers who need a lot of storage but use very little bandwidth?

7

It's true that Cloudfront does not charge for storage, but here is the point you are misinterpreting:

my files will be copied to many geographically distributed data centers.

Incorrect.

Cloudfront has dozens of edge locations around the globe, but your content is not exactly copied to them.

Instead, when a browser tries to fetch one of your files/objects, the request arrives at one of those locations and Cloudfront checks to see whether it already has a copy of the file of suitable freshness at that location or whether it needs to be fetched from the origin server (S3 in some cases).

If a viable local copy exists within the Cloudfront edge location, it's returned to the requester. If not, the file is fetched from the origin server, returned to the requester, and then saved at that cloudfront edge location for the next time it's needed there.

There is no guarantee that the copy of the object will persist at that edge until it expires, but typically, subsequent requests for the same object that arrive at the same cloudfront edge location will be served the locally-cached copy.

So for a customer with a large amount of data and very little traffic, Amazon's internal cost for Cloudfront storage is negligible... because anything never requested will never be stored, and anything with very low demand can be evicted from the cache.

1

Yes you are correct. You do not pay for storage. You pay for requests and transfer. If someone is using cloudfront, chances are they are getting some pretty major hits. Also, never forget storage is cheap.

In addition, there is an algorithm that Amazon uses to decide to Cache something or not. If something isn't being hit, I am guessing (since Amazon won't disclose the algorithm), that the request will go back to the origin instead of being cached on CloudFront.