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?

gefragt vor 4 Jahren378 Aufrufe
6 Antworten
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
beantwortet vor 4 Jahren
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.

beantwortet vor 4 Jahren
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.

beantwortet vor 4 Jahren
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 :(

beantwortet vor 4 Jahren
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/

beantwortet vor 4 Jahren
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?

beantwortet vor 4 Jahren

Du bist nicht angemeldet. Anmelden um eine Antwort zu veröffentlichen.

Eine gute Antwort beantwortet die Frage klar, gibt konstruktives Feedback und fördert die berufliche Weiterentwicklung des Fragenstellers.

Richtlinien für die Beantwortung von Fragen