[Fixed] Why i am getting an error when fetching from S3 Bucket url?

Issue

I tried uploading the image on s3 bucket, image is uploaded successfully but when I fetch the URL, it says "Access Denied".

*PS : I have unchecked Restrict public access
enter image description here

Solution

Adding this to Bucket Policy solved the problem !!!

{
  "Version":"2012-10-17",
  "Statement":[
    {
      "Sid":"PublicRead",
      "Effect":"Allow",
      "Principal": "*",
      "Action":["s3:GetObject","s3:GetObjectVersion"],
      "Resource":["arn:aws:s3:::Bucket_Name/*"]
    }
  ]
}

Leave a Reply

(*) Required, Your email will not be published