Reputation: 611
I am using my own domain to serve HTTPS s3 bucket via CloudFront. I don't want it to cache since its for QA environment.
I'm wondering how could i achieve this. Is it by Using Origin Cache Headers or Customize with 0 Time To Live?
Upvotes: 29
Views: 33685
Reputation: 191
Now, you can simply set the cachingDisabled policy on the cloudfront behavior.
On the AWS cloudfront console:
Upvotes: 18
Reputation: 39196
Please use customize option (Behavior -> Cache Behavior Settings) in AWS management console (CloudFront) and input the value for Minimum TTL, Default TTL, and Maximum TTL accordingly.
Minimum TTL
Specify the minimum amount of time, in seconds, that you want objects to stay in CloudFront caches before CloudFront forwards another request to your origin to determine whether the object has been updated. The default value for Minimum TTL is 0 seconds.
Maximum TTL
Specify the maximum amount of time, in seconds, that you want objects to stay in CloudFront caches before CloudFront queries your origin to see whether the object has been updated. The value that you specify for Maximum TTL applies only when your origin adds HTTP headers such as Cache-Control max-age, Cache-Control s-maxage, or Expires to objects.
Default TTL
Specify the default amount of time, in seconds, that you want objects to stay in CloudFront caches before CloudFront forwards another request to your origin to determine whether the object has been updated. The value that you specify for Default TTL applies only when your origin does not add HTTP headers such as Cache-Control max-age, Cache-Control s-maxage, or Expires to objects.
Upvotes: 21