diff --git a/docs/basics/101-139-s3.rst b/docs/basics/101-139-s3.rst index ec882c8d8..6bf6c528c 100644 --- a/docs/basics/101-139-s3.rst +++ b/docs/basics/101-139-s3.rst @@ -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.