如何使在S3中公开10,000个文件 [英] How to make 10,000 files in S3 public

查看:221
本文介绍了如何使在S3中公开10,000个文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在10,000个文件一斗的文件夹。似乎有没有办法上传他们,让他们公开立竿见影。所以我上传他​​们,他们是私人的,我需要让他们所有的公共。

I have a folder in a bucket with 10,000 files. There seems to be no way to upload them and make them public straight away. So I uploaded them all, they're private, and I need to make them all public.

我已经试过了AWS控制台,它只是提供了一个错误(正常工作与文件夹用更少的文件)。

I've tried the aws console, it just gives an error (works fine with folders with less files).

我已经使用在Firefox S3组织试过了,同样的事情。

I've tried using S3 organizing in Firefox, same thing.

有一些软件或一些脚本,我可以运行,使所有这些公开?

Is there some software or some script I can run to make all these public?

推荐答案

您可以生成一个桶政策(见下面的例子),它可以访问桶中的所有文件。铲斗政策可以加入到通过AWS控制台铲斗

You can generate a bucket policy (see example below) which gives access to all the files in the bucket. The bucket policy can be added to a bucket through AWS console.

{
    "Id": "...",
    "Statement": [ {
        "Sid": "...",
        "Action": [
            "s3:GetObject"
        ],
        "Effect": "Allow",
        "Resource": "arn:aws:s3:::bucket/*",
        "Principal": {
            "AWS": [ "*" ]
        }
    } ]
}

另外,也要看看Amazon提供以下策略生成工具。

Also look at following policy generator tool provided by Amazon.

http://awspolicygen.s3.amazonaws.com/policygen.html

这篇关于如何使在S3中公开10,000个文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆