wget public s3 桶

Wget public s3 bucket

我要下载this public s3 bucket without an AWS access key (since this is part of a tutorial that others have to follow). Each of the constituent files (example中的所有文件)可以单独下载。

你走的路并不容易:

  1. 您需要获取存储桶中的密钥(即文件)

您可以使用rest API并提出如下要求

    curl -H "GET /?list-type=2 HTTP/1.1" \
    -H "Host: halitereplaybucket.s3.amazonaws.com" \
    -H "Date: 20161025T124500Z" \
    -H "Content-Type: text/plain" https://halitereplaybucket.s3.amazonaws.com/

这将 return 以 xml 格式响应,其中包含存储桶中的内容和所有键。

  1. 您需要解析响应并提取所有密钥

  2. 对于每个密钥,您都可以请求下载文件

    wget 'http://halitereplaybucket.s3.amazonaws.com/{file}'
    

我知道你提到你不想使用 AWS 密钥,但使用 CLI 会很简单

aws s3 sync s3://halitereplaybucket .