0
votes

I just try to create amazon s3 for static page with this URL https://docs.aws.amazon.com/AmazonS3/latest/dev/website-hosting-custom-domain-walkthrough.html

And I had create 2 buckets as example.com and www.example.com And I had put a index.html to example.com then update the permission of the bucket policy as below

{
    "Version": "2012-10-17",
    "Statement": [
        {
            "Sid": "PublicReadGetObject",
            "Effect": "Allow",
            "Principal": "*",
            "Action": "s3:GetObject",
            "Resource": "arn:aws:s3:::example.com/*"
        }
    ]
}

Then I had deploy to my host which created in Amazon, but it is still in 403 forbidden as Code: AccessDenied Message: Access Denied

Then I found that index.html in example.com is not public. And no matter I click the file as "Make public" and set the public access in permission tab to let everyone to update "read object" in "Access to the object" It cannot be able to update to public.

any procedure I miss?

1

1 Answers

1
votes

There was a recent change in S3 called "Block Public Access" which adds an additional layer of security to prevent people from accidentally exposing content.

In the S3 console for you bucket, go into the Permissions tab and edit the Public access settings.

If you have added a Bucket Policy, then you should turn off the options under "Manage public bucket policies for this bucket".