How frequently do Amazon CloudFront objects expire

amazon s3amazon-cloudfront

The answer I can find in the FAQ is as follows

An object stays in an edge location
until it expires. After the object
expires, CloudFront must go back to
the origin server the next time that
edge location needs to serve that
object. By default, all objects
automatically expire after 24 hours.

However, I've been noticing recently that objects seem to be getting updated much more frequently than this. I tested a text file and changed it, and within the hour it reflected the change.

I'm just not clear if this was a fluke – or if they changed the expiration rules. Is this country/region specific – or were they just doing routine maintenance at the exact hour I tested (unlikely!) ?

Best Answer

The file isn’t necessarily cached on all of CloudFront’s edge servers. You may have retrieved the file from one location the first time, and a different edge server the second time.

You can see where the file is coming from by examining the Via HTTP header, which you can view by doing: curl -i http://your.url/.