Amazon S3的截止日期? [英] Amazon S3 Expiration Date?
问题描述
我希望这个问题不是太简陋,但我很困惑......
在S3文档我读:
所有的HTTP查询有失效 参数,允许您设置 长查询将是有效的。对于 例如,您可以配置一个网页 图形以经过很长的到期 一段时间或一个软件下载 只有持续24小时。
有关可公开访问的数据对象(文件),这是否意味着数据对象(文件)本身将不再有效,或者说,浏览器将重新缓存在到期日之后的对象。正如,我将失去十年后我的数据,如果我那么久设置我的到期?或者,如果我设置了下载24小时后,被它不见了/人迹罕至的过去呢?
如果我没有设定一个期限?
我相信你指的是存储在Amazon S3上的私人数据签名的网址。
如果文件是公众可访问它们可以用简单的URL到文件被访问:
例如 http://s3.amazonaws.com/ [斗] / [关键]
然而,它们可以被设置为<一个href="http://docs.amazonwebservices.com/AmazonS3/latest/dev/index.html?UsingAuthAccess.html">private在这种情况下,你需要提供一个签署网址访问该文件。使用此URL创建了公开和秘密密钥,它的这个网址,有一个到期时间。例如:
<$p$p><$c$c>http://[bucket].s3.amazonaws.com/[key]?AWSAccessKeyId=[AWS_Public_Key]&Expires=1294766482&Signature=[generated_hash]
根据您的问题,为Web图形,您可以重复使用同一个生成的URL与定远到未来的到期时间,使浏览器可以缓存文件,而文件下载你可能会创建一个新的URL与URL集的每个请求到期只提前一天来保护您的数据。
本不到期/删除/删除存储在S3上的数据。它仅影响的URL文件,并根据您的需要不同的到期日期,您可以产生尽可能多的网址。
I hope this question isn't too rudimentary, but I'm confused...
In the S3 documentation I read:
All HTTP queries have an expiration parameter that allows you to set how long the query will be valid. For example, you can configure a web page graphic to expire after a very long period of time or a software download to only last for 24 hours.
For a publicly accessible data object (file), does this mean that the data object (file) itself will not be valid anymore, or that the browser will simply re-cache the object after the expiration date. As in, will I lose my data after ten years if I set my expirations that long? Or if I set a download for 24 hours, is it gone/inaccessible past that?
What if I don't set an expiration date?
I believe you are referring to the signed urls for private data stored on Amazon S3.
If files are publicly accessible they can be accessed with a simple url to the file:
eg http://s3.amazonaws.com/[bucket]/[key]
However, they can be set to private in which case you need to provide a signed url to access the file. This url is created using your public and secret keys, and its this url that has an expiry time. eg
http://[bucket].s3.amazonaws.com/[key]?AWSAccessKeyId=[AWS_Public_Key]&Expires=1294766482&Signature=[generated_hash]
As per your question, for web graphics, you might re-use the same generated url with the expiry time set far into the future so that browsers can cache the file, whereas for file downloads you'd probably create a new url for each request with the url set to expire only a day in advance to protect your data.
This DOES NOT expire/delete/remove your data stored on S3. It only affects the url to the file and you can generate as many urls with different expiry dates as you require.
这篇关于Amazon S3的截止日期?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!