python-boto3创建未过期的URL

在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.

上一篇:AWS Firewall Manager


下一篇:AWS Secrets Manager