简体   繁体   English

Boto3 预签名 URL 用于下载和上传

[英]Boto3 presigned URL for download and upload

Creating a presigned URL with boto3 is easy.使用 boto3 创建一个预签名的 URL 很容易。 There are docs such as this:有这样的文档:

https://boto3.amazonaws.com/v1/documentation/api/latest/guide/s3-presigned-urls.html https://boto3.amazonaws.com/v1/documentation/api/latest/guide/s3-presigned-urls.html

But these only allow for upload OR download.但这些只允许上传或下载。 Can both be done at the same time?两者可以同时进行吗?

With STS upload and download credentials can be created that allow both get and put, but is this possible with presigned URLs?使用 STS 可以创建允许获取和放置的上传和下载凭据,但是使用预签名的 URL 可以做到这一点吗?

No, this is not possible because the HTTP verb is part of the canonical request which gets signed by the AWS credentials.不,这是不可能的,因为 HTTP 动词是由 AWS 凭证签名的规范请求的一部分。

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

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