How to Upload to AWS S3 as Public by Default

In a normal file upload the files uploaded to Amazon S3 are private, requiring a separate action to make public. In some cases we want the file to be loaded with public access granted to them, to be able to have this implemented add this policy to your S3 bucket.

{
  "Version": "2008-10-17",
  "Statement": [{
    "Sid": "AllowPublicRead",
    "Effect": "Allow",
    "Principal": {
      "AWS": "*"
    },
    "Action": [ "s3:GetObject" ],
    "Resource": [ "arn:aws:s3:::Bucket_Name/*" ]
  }]
}
To add this policy to your bucket follow the steps below:
  • click on bucket
  • expand the Permissions row
  • click “Add Bucket Policy”
  • copy/paste the snippet below into the text area.
  • change Bucket_Name to the bucket you want
  • submit your changes
Hope this was useful !