将 SSL 添加到我的云前端分配时,我的 route 53 服务是否需要任何配置?

Is there any configurations needed to my route 53 service when adding an SSL to my cloud front distribution?

我构建了一个 git 支持的静态站点,该站点位于 S3 存储桶中并使用代码管道进行更新。该站点完全托管在 AWS 上。 Route 53 名称服务器指向 S3 存储桶,但我最近创建了一个指向 S3 存储桶的 Cloudfront 分配,因此我能够拥有 SSL 证书。问题是我相信当您访问站点 url 时,它仍然指向 S3 存储桶而不是 Cloudfront 分布。这可能是由于 Route 53 配置问题造成的吗?

已通过 ACM 认证的 SSL 处于活动状态并托管在(美国东部)N。 Virgina 并已添加到 Cloudfront 发行版中的自定义 SSL 证书中。

Cloudfront 分布起源是 S3 存储桶,它是 "domainname.s3.amazonaws.com"(有两个分布,一个用于 domainname.com 和 www.domainname.com 分别指向每个存储桶。

我知道一个常见的解决方法是等待云端找到存储桶,所以我等了 24 小时才问这个问题。

如果我需要提供任何更多信息,请告诉我我已尝试尽可能多地证明,但我可能忽略了一些事情。

看来您必须更新 Route53 配置。

As the docs say:

If you want to use your own domain name, use Amazon Route 53 to create an alias record that points to your CloudFront distribution. An alias record is a Route 53 extension to DNS. It's similar to a CNAME record, but you can create an alias record both for the root domain, such as example.com, and for subdomains, such as www.example.com. (You can create CNAME records only for subdomains.) When Route 53 receives a DNS query that matches the name and type of an alias record, Route 53 responds with the domain name that is associated with your distribution.

您还可以通过 nslookupdig 检查您的域,看看域解析了什么,这样您就可以确保它是否指向您的 CloudFront 分配

nslookup yourdomain.com

dig / nslookup 的结果应该显示如下内容:

<hash>.cloudfront.net. 并且解析为多个 IP 地址