Isso é tratado com os mecanismos de controle de cache HTTP regulares (consulte RFC 2616 ) conforme documentado em Expiração do Amazon CloudFront Object , especificamente:
By default, each object automatically expires after 24 hours. To specify a different expiration time, configure your origin to add a value for either the Cache-Control max-age directive or the Expires header field to each object:
The
Cache-Control max-age
directive lets you specify how long (in seconds) you want the object to remain in the cache before CloudFront gets the object again from the origin server. The minimum expiration time CloudFront supports is 0 seconds for web distributions and 3600 seconds for RTMP distributions. The maximum is in the year 2038. Specify the value in the following format:
Cache-Control: max-age=seconds
For example, the following directive tells CloudFront to keep the associated object in the cache for 3600 seconds (one hour):
Cache-Control: max-age=3600
If you want objects to stay in CloudFront edge caches for a different duration than they stay in browser caches, you can use the
Cache-Control max-age
andCache-Control s-maxage
directives together. For more information, see Specifying the Minimum Time that CloudFront Caches Objects for Web Distributions.The
Expires
header field lets you specify an expiration date and time using the format specified in RFC 2616, Hypertext Transfer Protocol -- HTTP/1.1 Section 3.3.1, Full Date, for example:
Sat, 30 Jun 2012 23:59:59 GMT
[...]
We recommend that you use the Cache-Control max-age directive instead of the Expires header field to control object caching. If you specify values both for Cache-Control max-age and for Expires, CloudFront uses only the value of max-age. [emphasis mine]
Você também pode querer dar uma olhada na tabela em Especificando o tempo mínimo que O CloudFront armazena objetos para distribuições na Web para entender as peculiaridades do TTL mínimo = 0 (padrão) (veja minha resposta para Para que é útil um TTL 0 no CloudFront? para obter uma explicação mais detalhada desse recurso).