Itzhak Eretz Kdosha
Itzhak Eretz Kdosha

Reputation: 543

S3 web hosting endpoint produce "This site can’t be reached"

I am trying to host a static web page on AWS S3 but get "This site can’t be reached" when trying to reach my endpoint: http://iekdosha-test1.com.s3-website-eu-central-1.amazonaws.com/

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

What could possibly be the issue?

Upvotes: 0

Views: 306

Answers (1)

Michael - sqlbot
Michael - sqlbot

Reputation: 178956

The eu-central-1 region does not use the old style ${bucket}.s3-website-${region}.amazonaws.com endoint convention for web site hosting endpoints. You need a dot . rather than a dash - after the word website in URLs for this region -- ${bucket}.s3-website.${region}.amazonaws.com.

This newer style actually works in any region, even though the Regions and Endpoints documentation still shows the old style endpoints for older regions.

Upvotes: 1

Related Questions