简体   繁体   English

AWS Cloudfront 如何知道源何时更新?

[英]How AWS cloudfront knows when the origin is updated?

I have configured cloudfront distribution with OAI and S3 as origin.我已经配置了以 OAI 和 S3 作为来源的云端分发。 So the request from user goes from User -> Edge Location -> CloudFront-> S3 .因此,来自用户的请求来自User -> Edge Location -> CloudFront-> S3 Based on the documentation CloudFront can also cache frequently accessed objects.根据文档,CloudFront 还可以缓存经常访问的对象。
Question:问题:
1>When object is updated in S3 how does cloudfront know that the object is changed at origin? 1>当 object 在 S3 中更新时,云端如何知道 object 在原点更改? Is there any trigger from S3-> CloudFront -> Edge? S3-> CloudFront -> Edge 是否有任何触发器?
2>If there is no trigger, then how do we trigger cloudfront redistribution of objects from S3? 2>如果没有触发器,那么我们如何从S3触发对象的云端重新分配? ( this is typically after code deployment to s3) (这通常是在代码部署到 s3 之后)

When object is updated in S3 how does cloudfront know that the object is changed at origin?当 object 在 S3 中更新时,云端如何知道 object 在原点更改? Is there any trigger from S3-> CloudFront -> Edge? S3-> CloudFront -> Edge 是否有任何触发器?

It does not "know" that immediately, until objects in cache expire.它不会立即“知道”,直到缓存中的对象过期。 You have to refresh catch manually or build an automation for that yourself, to for cache invalidation.您必须手动刷新捕获或自己构建自动化,以使缓存失效。

If there is no trigger, then how do we trigger cloudfront redistribution of objects from S3?如果没有触发器,那么我们如何从 S3 触发对象的云端重新分配? ( this is typically after code deployment to s3) (这通常是在代码部署到 s3 之后)

You have to invalidate the cache yourself, as explained earlier.如前所述,您必须自己使缓存无效

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM