我正在使用AmazonS3 .NET SDK生成预签名的URL.他们的工作状况很好,但现在已经停止工作.我过去通常将Expires日期设置为2038年,因为我想使它们尽可能地永久.我使用2038年是因为该日期是一个新纪元,并且存在2038年的问题( en.wikipedia/wiki/Year_2038_problem ).SDK并没有限制您的日期,但是似乎在您访问URL时,它会为您提供拒绝访问的消息,并显示以下消息:
I'm generating pre-signed urls with AmazonS3 .NET SDK. They were working fine but they have stopped working now. I used to set an Expires date near to year 2038 because I wanted to make them as permanent as posible. I used 2038 because that date is an epoch date and there is the Year 2038 problem (en.wikipedia/wiki/Year_2038_problem). The SDK doesn't limit you on the date but it seems that when you access the url it gives you an Access Denied with the following message:
<Message>Invalid date (should be seconds since epoch): 2147500800</Message>有人知道到期日期是否有限制?
Does anyone know if there are any limits with the Expires date?
推荐答案您似乎已经知道答案了.
It looks like you already know the answer to this.
一项快速测试显示,2038年1月19日(星期二)UTC大约在03:14 UTC之后,失效日期确实确实失败了.您已经遇到了链接到的Wikipedia文章中的错误.
A quick test reveals that expiry dates after approximately 03:14 UTC on Tuesday, 19 January 2038 do indeed fail. You've run into the bug in the wikipedia article you linked to.
更多推荐
AmazonS3 GetPreSignedUrlRequest的最大到期日期
发布评论