You may want to create a public bucket that is read only. There are three ways to do this:

  1. Use the WebGUI to add a custom bucket policy by selecting the tool wrench "Bucket Policies" next the bucket name. Copy and paste the custom JSON policy below, using your bucketname.


Or: 

  1. Use AWS CLI tool. Save the below to a JSON file and apply.
    aws s3api put
    -bucket-policy --bucket MyBucket --policy file://policy.json --endpoint-url MyURL

  2. Get current bucket Policy with AWS CLI tool

aws s3api get-bucket-policy --bucket MyBucket --endpoint-url MyURL



Example of a Custom JSON policy


{

  "Version": "2012-10-17",

  "Statement": [

    {

      "Action": ["s3:GetBucketLocation"],

      "Effect": "Allow",

      "Principal": { "AWS": ["*"] },

      "Resource": ["arn:aws:s3:::bucketname"],

      "Sid": ""

    },

    {

      "Action": ["s3:GetObject"],

      "Effect": "Allow",

      "Principal": { "AWS": ["*"] },

      "Resource": ["arn:aws:s3:::bucketname/*"],

      "Sid": ""

    }

  ]

}


For more information on the use and format of Amazon Resource Names (ARNs)

https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html.


Have an other question? Contact us!