Error in bucket naming rules for hosting with domain with special chars?

0

Hi,
I have multiple smaller sites hosted on S3, but I've run into a problem with a new domain. I've put up a CNAME on a domain (as I normally do), and create a bucket for the domain. But the domain energimærkning.dk I have translates into xn--energimrkning-9fb.dk (a way to handle domains with special characters internationally I guess). Which is fine... but the bucket-naming system cannot handle the two hyphens in a row it seems?

Does anyone have any experience with handling domains with special characters in S3 bucket naming?

asked 4 years ago371 views
6 Answers
0

It seems that you are not violating any naming rules.
https://docs.aws.amazon.com/AmazonS3/latest/dev/BucketRestrictions.html

As you can see that I have successfully created bucket and name contains three hyphens in row and very similar with your bucket.

❯ aws s3 ls | grep xn
2020-05-13 15:46:37 xn-testtest-testtest-test---test.dk
2020-05-13 15:56:30 xn2--energimrkning-9fb.dk
answered 4 years ago
0

Hi Awskakan

Thank you for testing. It seems like the bucket-name only fails if it starts with "xn--". Can you confirm this? I have not tried in commandline, only through web interface.

answered 4 years ago
0

Yes you right, I could not create bucket if the names start with xn--

 aws s3 mb s3://xn--testenergimrkning-9fb.dk

make_bucket failed: s3://xn--testenergimrkning-9fb.dk An error occurred (InvalidBucketName) when calling the CreateBucket operation: The specified bucket is not valid.

answered 4 years ago
0

Thank you... guess I have to find some other hosting solution than S3 for this and other sites that have special chars in the domain :(

answered 4 years ago
0

So, apparently AWS blocked all domains starting with xn-- due to an punycode exploit... more about it here if anyone has the same problem: https://www.helpnetsecurity.com/2020/03/05/register-malicious-domains/

answered 4 years ago
0

Is there going to be a solution to this Amazon? Currently it appears S3/Route53 static hosting is not possible for any internationalized domain name?

answered 4 years 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