Closed slimandslam closed 5 years ago
For me it's a dash: http://blog.joshwalsh.me.s3-website-ap-southeast-2.amazonaws.com/
EDIT: A dot works too: http://blog.joshwalsh.me.s3-website.ap-southeast-2.amazonaws.com/. Is there a reason the dot should be preferred?
For best results, your bucket name should not contain periods. Amazon used to let you do that (maybe they still do) but it will break certain things, and it is definitely not DNS-compliant.
Bucket names must be a series of one or more labels. Adjacent labels are separated by a single period (.). Bucket names can contain lowercase letters, numbers, and hyphens. Each label must start and end with a lowercase letter or a number.
And periods certainly are DNS-compliant. There are very few DNS names that don't have periods in them.
What I meant is that is it not DNS convention to use periods within a name. blog.joshwalsh.me is not a single name under DNS conventions, it's a root apex and a 2nd level domain. At the moment, using periods in your bucket name only keeps you from using Amazon S3 Transfer Acceleration, but that could change. Who knows, maybe things will get better?
Whether you can use a dash or a period after the word "website" in the S3 website URL appears to depend on the region (maybe some regions handle both?). Reference: https://docs.aws.amazon.com/AmazonS3/latest/dev/WebsiteEndpoints.html
Very interesting that S3 Transfer Acceleration doesn't work for buckets with . in the name.
You're talking about DNS labels though. A DNS label can't contain any periods, but a DNS name is a list of labels separated by periods. blog.joshwalsh.me absolutely is a single DNS name, and it contains 3 labels.
The docs for bucket names say "The name of the bucket used for Amazon S3 Transfer Acceleration must be DNS-compliant and must not contain periods (".")." (emphasis mine)
Good find about the website endpoints. This is crazy. I wonder if there's a way we can get the website endpoint from AWS, or if we just have to use a mapping based on this information.
Related PR: #23
Released in 0.3.0
After doing:
$ npm run deploy
It updates the site and then reports:
That URL is incorrect tho:
It should be (change the dash to a period after "website")
http://mysite.s3-website.us-east-1.amazonaws.com