没有到期日期的 AWS S3 预签名 URL [英] AWS S3 pre signed URL without Expiry date

查看:45
本文介绍了没有到期日期的 AWS S3 预签名 URL的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有什么方法可以生成没有任何到期日的预签名 URL 吗?我正在开发一个电子邮件应用程序,我的附件将保存在 S3 中.另外请让我知道通过 JavaScript SDK 下载附件的最佳方式是什么.

Is there any way that I can generate Pre-Signed URL's without any expiry date ? I'm developing a Email app where my attachments will be saved in S3. Also please let me know what is the best way to download attachments via JavaScript SDK.

我正在使用以下代码

var params = {Bucket: 'bucket', Key: 'key', Expires: 60};
var url = s3.getSignedUrl('getObject', params);
console.log('The URL is', url);

推荐答案

预签名 url 的最长过期时间为 一周从创建之时起.因此,没有到期时间的预签名网址是不可能的.

The maximum expiration time for presigned url is one week from time of creation. So there is no way to have a presigned url without expiry time.

这篇关于没有到期日期的 AWS S3 预签名 URL的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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