5/06/2016

How to configure your s3 bucket public.


To set the all files in bucket public, add the bucket policy to your s3 bucket.
1. Go to https://awspolicygen.s3.amazonaws.com/policygen.html
2.  Set the following parameters.
          Select Type of Policy with "S3 bucket policy".
          Effect: Allow
          Principal:   *
          AWS Service: S3
          Actions:  GetObject
          Amazon Resource Name (ARN):    arn:aws:s3:::bucket-name/*

 3. Then, click 'Add Statement'
 4.  Click the 'Generate Policy' button. You'll get the following information like below.

{
  "Id": "Policy1462558474573",
  "Version": "2012-10-17",
  "Statement": [
    {
      "Sid": "Stmt1462581569846",
      "Action": [
        "s3:GetObject"
      ],
      "Effect": "Allow",
      "Resource": "arn:aws:s3:::bucket-name/*",
      "Principal": "*"
    }
  ]
}
5. Add above information in your s3 bucket policy.
That's it!