我覆盖了我上传到S3上的存储桶的文件,并使用cloudfront然后显示我网站上的文件。然而,他们没有更新..我需要清除某种缓存或什么?
答案 0 :(得分:0)
您将不得不使缓存无效。查看api documentation
您使用类似于此的XML主体编写POST请求:
POST /2014-11-06/distribution/distribution ID/invalidation HTTP/1.0
Host: cloudfront.amazonaws.com
Authorization: AWS authentication string
Content-Type: text/xml
Other required headers
<?xml version="1.0" encoding="UTF-8"?>
<InvalidationBatch xmlns="http://cloudfront.amazonaws.com/doc/2014-11-06/">
<Paths>
<Quantity>number of objects to invalidate</Quantity>
<Items>
<Path>/path to object to invalidate</Path>
</Items>
</Paths>
<CallerReference>unique identifier for this invalidation batch</CallerReference>
</InvalidationBatch>