Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>If you want to make all objects public by default, the simplest way is to do it trough a <a href="http://docs.aws.amazon.com/AmazonS3/latest/dev/UsingBucketPolicies.html" rel="noreferrer">Bucket Policy</a> instead of Access Control Lists (ACLs) defined on each individual object.</p> <p><a href="https://i.stack.imgur.com/zoeOE.png" rel="noreferrer"><img src="https://i.stack.imgur.com/zoeOE.png" alt="enter image description here"></a></p> <p>You can use the <a href="http://awspolicygen.s3.amazonaws.com/policygen.html" rel="noreferrer">AWS Policy Generator</a> to generate a bucket policy for your bucket. </p> <p>For example, the following policy will allow anyone to read every object in your S3 bucket (just replace <code>&lt;bucket-name&gt;</code> with the name of your bucket):</p> <pre><code>{ "Id": "Policy1380877762691", "Statement": [ { "Sid": "Stmt1380877761162", "Action": [ "s3:GetObject" ], "Effect": "Allow", "Resource": "arn:aws:s3:::&lt;bucket-name&gt;/*", "Principal": { "AWS": [ "*" ] } } ] } </code></pre> <p>The Bucket Policy contains a list of <code>Statements</code> and each statement has an <code>Effect</code> (either <code>Allow</code> or <code>Deny</code>) for a list of <code>Actions</code> that are performed by <code>Principal</code> (the user) on the specified <code>Resource</code> (identified by an <code>Amazon Resource Name</code> or <code>ARN</code>). </p> <p>The <code>Id</code> is just an optional policy id and the <code>Sid</code> is an optional unique statement id.</p> <p>For S3 Bucket Policies, the Resource ARNs take the form:</p> <pre><code>arn:aws:s3:::&lt;bucket_name&gt;/&lt;key_name&gt; </code></pre> <p>The above example allows (<code>Effect: Allow</code>) anyone (<code>Principal: *</code>) to access (<code>Action: s3:GetObject</code>) any object in the bucket (<code>Resource: arn:aws:s3:::&lt;bucket-name&gt;/*</code>).</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload