![](/img/trans.png)
[英]AWS: Custom SSL certificate option is disabled in CloudFront, but I created a SSL certificate using AWS Certificate Manager
[英]How to create another cloudfront distribution using same SSL certificates created in certificate manager
在 Aws 证书管理器中,我创建了 SSL 证书并将其添加到 dns。
*.test.example.com
在 Cloudfront 中,我创建了一个具有以下 CNAME 的发行版
dev.test.example.com
然后,我可以成功访问 dev.test.example.com。
之后,我尝试使用相同的 SSL 证书使用 CNAME uat.test.example.com 创建另一个发行版
但是发生错误并且无法创建分发。
com.amazonaws.services.cloudfront.model.CNAMEAlreadyExistsException: One or more aliases specified for the distribution includes an incorrectly configured DNS record that points to another CloudFront distribution. You must update the DNS record to correct the problem
不要在 DNS 中为 cloudfront 使用通配符 ( *
),仅用于证书。 您应该为每个域名创建一个 CNAME 并将其指向其相应的云端 url:
dev.test.example.com
CNAME 0123456789.cloudfront.net
uat.test.example.com
CNAME 9876543210.cloudfront.net
拥有*.test.example.com
是完全有效的 DNS,但意味着所有匹配*.test.example.com
的流量(包括您的dev
、 uat
和任何其他未来子域)都将发送到您的 dev cloudfront 分发。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.