简体   繁体   English

如何使用预签名 url 将对象上传到本地 s3

[英]How to upload objects to local s3 using pre-signed url

Writing test cases to test file upload functionality using presigned url. I am running localstack in docker local as aws environment.使用预签名 url 编写测试用例以测试文件上传功能。我在 docker 本地作为 aws 环境运行 localstack。 I am able to test direct upload to local stack, however when I try to upload using presigned url it is failing as my presigned url is generated with https and my local stack is running on http.我能够测试直接上传到本地堆栈,但是当我尝试使用预签名 url 上传时,它失败了,因为我的预签名 url 是用 https 生成的,而我的本地堆栈在 http 上运行。

Any suggestions on how to test in local?关于如何在本地测试有什么建议吗?

I suppose it is not possible since the hostname and domain name in the pre-signed URL (.s3..amazonaws.com) would always be resolved to the remote/cloud AWS and not localhost, irrespective of the protocol.我想这是不可能的,因为预签名 URL (.s3..amazonaws.com) 中的主机名和域名将始终解析为远程/云 AWS,而不是本地主机,无论协议如何。

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

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