如何授予对私有 s3 存储桶中对象的长期读取访问权限
How to give long term read access to objects in a private s3 bucket
好吧,我有一项每天生成 PDF 文件的服务,我需要通过电子邮件共享下载 link 到此 pdf 文件以发送给我们的客户。
我正在考虑将这些文件保存到 s3 存储桶中,但我们需要确保这些下载 links 将一直有效,我经历了 Amazon S3 Pre-Signed URLs
但只有 asfaik 预签名 url对 maximum of 7 days
有效,但 links 应该一直有效,有没有其他方法可以长期访问 s3 对象?
无法生成有效期超过一周的 Amazon S3 预签名 URL。
对于长期而言,您需要使用 CloudFront 签名 URL,您可以为其设置很远的到期日。
在 Medium 上查看 Serving Private Content with Signed URLs and Signed Cookies and Using Signed URLs in the CloudFront documentation and Using CloudFront Signed URLs to Serve Private S3 Content。
您可以创建一个自定义下载 link 来访问您的后端服务(使用 jwt,或您选择的其他过期的东西)。
在您的服务器上验证 JWT 后,生成一个新的 S3 预签名 link(短期到期)并继续下载。
好吧,我有一项每天生成 PDF 文件的服务,我需要通过电子邮件共享下载 link 到此 pdf 文件以发送给我们的客户。
我正在考虑将这些文件保存到 s3 存储桶中,但我们需要确保这些下载 links 将一直有效,我经历了 Amazon S3 Pre-Signed URLs
但只有 asfaik 预签名 url对 maximum of 7 days
有效,但 links 应该一直有效,有没有其他方法可以长期访问 s3 对象?
无法生成有效期超过一周的 Amazon S3 预签名 URL。
对于长期而言,您需要使用 CloudFront 签名 URL,您可以为其设置很远的到期日。
在 Medium 上查看 Serving Private Content with Signed URLs and Signed Cookies and Using Signed URLs in the CloudFront documentation and Using CloudFront Signed URLs to Serve Private S3 Content。
您可以创建一个自定义下载 link 来访问您的后端服务(使用 jwt,或您选择的其他过期的东西)。
在您的服务器上验证 JWT 后,生成一个新的 S3 预签名 link(短期到期)并继续下载。