by shigemk2

当面は技術的なことしか書かない

CloudFront 代替ドメイン制限

ドメイン名の文字数にリミットがあるのはともかくとして、他のところは、複数のディストリビューションで同じ名前の代替ドメインをつけることはできないけど、片方ワイルドカードでもう片方が指定されたドメインならいけるそうな。

You cannot add an alternate domain name to a CloudFront distribution if the same alternate domain name already exists in another CloudFront distribution, even if your AWS account owns the other distribution.

However, you can add a wildcard alternate domain name, such as .example.com, that includes (that overlaps with) a non-wildcard alternate domain name, such as www.example.com. If you have overlapping alternate domain names in two distributions, CloudFront sends the request to the distribution with the more specific name match, regardless of the distribution that the DNS record points to. For example, marketing.domain.com is more specific than .domain.com.

docs.aws.amazon.com