Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/amazon-s3/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
是否可以刷新过期的url(用于aws bucket上的文件)_Url_Amazon S3 - Fatal编程技术网

是否可以刷新过期的url(用于aws bucket上的文件)

是否可以刷新过期的url(用于aws bucket上的文件),url,amazon-s3,Url,Amazon S3,我有aws桶上的文件。这个文件应该可以在url上访问,但这个特定的url已经过期(过期时间两周),现在我需要一些帮助,使这个文件可以在url上访问 尝试访问URL时,我收到以下错误消息: this XML file does not appear to have any style information associated with it. The document tree is shown below " 并显示带有错误代码的xml AccessDenied和message请求已过期严

我有aws桶上的文件。这个文件应该可以在url上访问,但这个特定的url已经过期(过期时间两周),现在我需要一些帮助,使这个文件可以在url上访问

尝试访问URL时,我收到以下错误消息:

this XML file does not appear to have any style information associated with it. The document tree is shown below "
并显示带有错误代码的xml


AccessDenied
和message
请求已过期

严格来说,不可能将S3预签名URL的生存期延长到其原始过期时间戳之外

回顾两种可能的签名算法背后的逻辑(不推荐,这可以通过查询字符串中的
AWSAccessKeyId
来识别)和(通过查询字符串中的
X-Amz-Credential
来识别),可以清楚地看出为什么这是真的——服务不保留签名URL的副本,并且到期参数是HMAC-SHA签名过程的输入之一,因此它有效地抵抗篡改

您需要生成或获取新的预签名URL



额外的琐事:当预签名的URL过期时,S3甚至不需要验证签名是否正确或用于生成它的凭据是否有效——请求立即被拒绝。

在尝试使用过期的URL时,您是否从AWS收到任何特定的错误消息?“此XML文件似乎没有任何与之关联的样式信息。文档树如下图所示,显示了错误代码为“AccessDenied”和消息“Request has expired”的xml。您是自己生成预签名URL还是从某处获取它们?