Skip to content

Commit

Permalink
Add bucket policy alternative
Browse files Browse the repository at this point in the history
  • Loading branch information
adswa committed Jul 4, 2024
1 parent c6026c2 commit 4faca8c
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions docs/basics/101-139-s3.rst
Original file line number Diff line number Diff line change
Expand Up @@ -222,6 +222,28 @@ To make them public, switch to the "Permissions" tab in your buckets S3 console

Bucket settings allow making the bucket public

Alternatively, create a bucket policy as shown below, inserting your own bucket name into the two placeholders::

{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Principal": "*",
"Action": "s3:GetObject",
"Resource": [
"arn:aws:s3:::YOUR-BUCKET-NAME-HERE",
"arn:aws:s3:::YOUR-BUCKET-NAME-HERE/*"
]
}
]
}

.. figure:: ../artwork/src/aws_s3_bucket_policy.png

Bucket policy to allow objects in the bucket to be retrieved by anyone.


.. find-out-more:: Info on public buckets created prior to April 2023

Amazon S3 buckets created before April 2023 supported using ACLs for public read access to files.
Expand Down

0 comments on commit 4faca8c

Please sign in to comment.