Bucket endpoint URL not found

0

I have a bucket configured as a static web site, and have uploaded an index.html. I can ping the endpoint URL. The URL on my configured bucket is the site name followed by s3-website-us-east-2.amazonaws.com Note the dash between website and US. The CNAME form will not accept that as an endpoint. When I change the dot to a dash, cdnsnow.net is still not resolved.

What's going on? How can I fix this?

asked 5 months ago328 views
8 Answers
0
Accepted Answer

The CNAME record has www in record name field, so www.cdnsnow.net in total. The issue is the value—the endpoing is not being accepted. I’m beginning to wonder if the bucket is corrupt and confused about what its region is. I deleted the bucket and it’s off the list, but when I. try to recreate it, I get “conflicting operation in progress.” Surely it doesn’t take several minutes to accomplish the deletion?

answered 5 months ago
profile picture
EXPERT
reviewed 5 months ago
0

Very strange. The bucket, as you observed, is Ohio -east-2. Code: IncorrectEndpoint Message: The specified bucket exists in another region. Please direct requests to the specified endpoint. Endpoint: cdnsnow.net.s3-website.us-east-2.amazonaws.com RequestId: 5YZ62DYGAGMD5XHF HostId: b1bISmwY9Zg3Iqurs3osVUttGtvDS3sYqXtnNhYmdY/NdTMFRMFGL0g+3Ptx2XaBEuZJPiow2Bw=

However, the record editor will not accept this. It will accept -east-1. It says that -2- is not a valid endpoint. Something is inconsistent.

answered 5 months ago
  • Endpoint: cdnsnow.net.s3-website.us-east-2.amazonaws.com

    There's a dot between the words "website" and "us", not a hyphen.

    This resolves in DNS when I do an nslookup, and a browser returns your "Hello world" page.

    Does it work if you use that in your Route 53 record?

  • Confirmed this is the right format of the endpoint name for your region - see Amazon S3 website endpoints section of https://docs.aws.amazon.com/general/latest/gr/s3.html

    Some regions have a dot, and others have a hyphen.

0

If I don't otherwise specify, I create an A record. I specify that it route to a website endpoint. The endpoint for the bucket is not accepted as valid, for either the dot or dash version. No suggestions are available.

answered 5 months ago
  • What's the website endpoint for the bucket? From the info in your question it appears it would need to be cdnsnow.net.s3-website-us-east-2.amazonaws.com is that right?

    That address doesn't resolve.

    $ nslookup cdnsnow.net.s3-website-us-east-2.amazonaws.com
    Server:         127.0.0.53
    Address:        127.0.0.53#53
    
    ** server can't find cdnsnow.net.s3-website-us-east-2.amazonaws.com: NXDOMAIN
    

    Your bucket's name has to be the same as the name of the domain that it's hosting https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/RoutingToS3Bucket.html#routing-to-s3-bucket-prereqs

0

I recreated the bucket to live in zone -east-2-. But the record editor still demands -1-. Here's what the browser says.

Code: IncorrectEndpoint
Message: The specified bucket exists in another region. Please direct requests to the specified endpoint.
Endpoint: cdnsnow.net.s3-website.us-east-2.amazonaws.com
RequestId: 60GQ27EHREE9KA2A
HostId: 9RQDRn4P2lObPpZGJMrwpumG67xsMcTSSkmblT66DxGd4ziJRleIW/118RuV92O4ykufsGawCPs=

I'm totally confused by this. Thanks for sticking with me.

answered 5 months ago
  • Right now when I try to hit the us-east-1 bucket endpoint, it tells me The specified bucket exists in another region and that the correct endpoint is cdnsnow.net.s3-website.us-east-2.amazonaws.com.

    When I try to hit that us-east-2 endpoint I get a 403 Forbidden, Access Denied error. I think this means that you need to look again at the permissions associated with the bucket, and check it is setup for static website hosting. You know how to do this because you did it before (your "Hello World" page could be hit yesterday).

    Once that works, go onto the Route 53 stuff.

    I'm intrigued when you say that the Route 53 record editor throws as error when you attempt to put the bucket endpoint in as a CNAME, because a CNAME should be able to be set to be anything. Like you can run your fingers randomly back and forth across the keyboard, then put ".com" on the end of it and it should be accepted as a CNAME.

    Okay it won't come back with anything when you try to nslookup, but Route 53 should add the entry to the hosted zone without questioning it.

    Record name: www (cdnsnow.net is automatically appended) Record type: CNAME Alias: don't touch, keep this off Value: the bucket endpoint, which you get from S3 -> Buckets -> www.cdnsnow.net -> Properties -> Static website hosting

    If this doesn't work then can you send a screengrab of the values that you're trying to set, and a screengrab of the error you get from the Route 53 console.

0

Piecing things together, the domain you've registered cdnsnow.net

You also must have a bucket in us-east-2 called cdnsnow.net which is setup with Static website hosting enabled - with that in place the bucket website endpoint will be http://cdnsnow.net.s3-website-us-east-2.amazonaws.com

If it's setup correctly you should be able to hit the website endpoint in a browser (note that you have to use HTTP, not HTTPS). I cannot hit that endpoint right now so there's probably a problem here to fix, before starting doing anything in Route 53.

I have a very similar setup with a website in a .net domain hosted using S3. I've got two buckets called mydomain.net and www.mydomain.net, both with website hosting enabled, and the corresponding entries in the Route 53 hosted zone are below.

Note that my buckets are in Sydney and (from what's in your question) yours appear to be in Ohio, but apart from that it should pretty much be the same.

First thing though is making sure those bucket endpoints are accessible, and then the rest should fall into place.

Enter image description here

And for www:

Enter image description here

profile picture
EXPERT
Steve_M
answered 5 months ago
0

Just noticed something else as well, in your original question:

The CNAME form will not accept that as an endpoint. When I change the dot to a dash, cdnsnow.net is still not resolved.

You can't use a CNAME for the zone apex (a.k.a. naked domain), only an A-record or an alias. So cdnsnow.net cannot be a CNAME, although www.cdnsnow.net (and so on) could be https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/ResourceRecordTypes.html#CNAMEFormat

profile picture
EXPERT
Steve_M
answered 5 months ago
0

Promise not to sneer? It was two things. In the A-record editor, I’d set the zone to N. Virginia, where I’m actually located, rather than Ohio where the bucket is. And, I had not provided a policy, assuming that if I had granted public access nothing else was necessary. (BTW the policy editor creates a policy with missing fields).

Thanks for all the help.

answered 5 months ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions