如何更新在亚马逊的CDN(CloudFront的)文件? [英] How can I update files on Amazon's CDN (CloudFront)?

查看:1430
本文介绍了如何更新在亚马逊的CDN(CloudFront的)文件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有什么办法来更新存储在Amazon CloudFront的(亚马逊的CDN服务)的文件? 好像它不会采取文件的任何更新,我们做(如删除文件,并像以前存储的新的使用相同的文件名)。 我必须明确地触发更新过程,请从边缘服务器中的文件,以获取新的文件内容发表?

Is there any way to update files stored on Amazon CloudFront (Amazon's CDN service)? Seems like it won't take any update of a file we make (e.g. removing the file and storing the new one with the same file name as before). Do I have to explicitly trigger an update process to remove the files from the edge servers to get the new file contents published?

感谢您的帮助

推荐答案

亚马逊增加了失效功能。 <一href="http://docs.amazonwebservices.com/AmazonCloudFront/latest/APIReference/index.html?Actions_Invalidations.html">This是参考。

Amazon added an Invalidation Feature. This is API Reference.

从API对照品请求:

POST /2010-08-01/distribution/[distribution ID]/invalidation HTTP/1.0
Host: cloudfront.amazonaws.com
Authorization: [AWS authentication string]
Content-Type: text/xml

<InvalidationBatch>
   <Path>/image1.jpg</Path>
   <Path>/image2.jpg</Path>
   <Path>/videos/movie.flv</Path>
   <CallerReference>my-batch</CallerReference>
</InvalidationBatch>

这篇关于如何更新在亚马逊的CDN(CloudFront的)文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆