简体   繁体   English

boto3 python为整个存储桶生成预签名的url

[英]boto3 python generate pre signed url for a whole bucket

I am trying to give temporary download access to a bucket in my s3. 我正在尝试为s3中的存储桶提供临时下载权限。

using boto3.generate_presigned_url(), I have only managed to download a specific file from that bucket but not the bucket itself. 使用boto3.generate_presigned_url(),我只能从该存储桶下载特定文件,而不能从存储桶本身下载。

is there any option to do so or my only option is to download the bucket content, zip it, upload it, and give access to the zip? 有什么选择吗,或者我唯一的选择是下载存储桶内容,将其压缩,上传并授予对zip的访问权限?

Have you tried cycling through the list of items in the bucket? 您是否尝试过浏览存储桶中的项目列表?

do a aws s3 ls <bucket_name_with_Presigned_URL> and then use a for loop to get each item. 执行aws s3 ls <bucket_name_with_Presigned_URL> ,然后使用for循环获取每个项目。

Hope this helps. 希望这可以帮助。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM