Wednesday, March 3, 2021

403 Forbidden static web hosting on AWS S3

I encounterd an error while making the bucket for static webhosting on AWS S3. Made the below update in the policy and it worked fine. Done on the aws console.
Thanks to stack overflow ;)
{
  "Version":"2012-10-17",
  "Statement":[{
    "Sid":"PublicReadGetObject",
    "Effect":"Allow",
    "Principal": "*",
    "Action":["s3:GetObject"],
    "Resource":["arn:aws:s3:::example.com/*"]
  }]
}

Substitute the bucket name example.com with your bucket name
 

 Recommended Reading

No comments:

Post a Comment