我可以使用我的凭据通过 S3cmd 工具将一些内容推送到 S3 存储桶,其中 s3cmd put contentfile S3://test_bucket/test_file
问题是,我需要在其他没有安装 s3cmd 的计算机上从这个存储桶下载内容,但他们安装了 wget。
当我尝试使用 wget 从我的存储桶下载一些内容时,我得到了这个:
https://s3.amazonaws.com/test_bucket/test_file
--2013-08-14 18:17:40-- `https`://s3.amazonaws.com/test_bucket/test_file
Resolving s3.amazonaws.com (s3.amazonaws.com)... [ip_here]
Connecting to s3.amazonaws.com (s3.amazonaws.com)|ip_here|:port... connected.
HTTP request sent, awaiting response... 403 Forbidden
`2013`-08-14 18:17:40 ERROR 403: Forbidden.
我已通过 Amazon AWS Web 控制台手动公开此存储桶。
问题是:如何使用 wget 从 S3 存储桶下载内容?成txt本地文件?
最佳答案
您应该能够从如下创建的 url 访问它:http://{bucket-name}.s3.amazonaws.com/<path-to-file>
现在,假设您的 s3 文件路径是:s3://test-bucket/test-folder/test-file.txt
您应该能够使用以下网址获取此文件:http://test-bucket.s3.amazonaws.com/test-folder/test-file.txt
关于https - 如何使用 wget 从 S3 存储桶下载文件?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18239567/