boto3 创建不会过期的 URLS

boto3 Create non-expiring URLS

在boto3中,有一个生成预签名url的函数,但是它们超时了。 参见:http://boto3.readthedocs.io/en/latest/reference/services/s3.html#S3.Client.generate_presigned_url

有没有办法创建不会过期的非预签名 URL?

无法创建非预签名 URL 或没有过期的预签名 URL。预签名 URL 的基本用途是

A pre-signed URL gives you access to the object identified in the URL, provided that the creator of the pre-signed URL has permissions to access that object. That is, if you receive a pre-signed URL to upload an object, you can upload the object only if the creator of the pre-signed URL has the necessary permissions to upload that object.

All objects and buckets by default are private. The pre-signed URLs are useful if you want your user/customer to be able upload a specific object to your bucket, but you don't require them to have AWS security credentials or permissions. When you create a pre-signed URL, you must provide your security credentials, specify a bucket name, an object key, an HTTP method (PUT for uploading objects), and an expiration date and time. The pre-signed URLs are valid only for the specified duration.

您可以将最长到期时间设置为 7 天,即 604800 秒。

check here了解更多信息。

请检查 X-Amz-Expires in table 出现在上面 link.