AWS CloudFront 自定义 SSL 证书已禁用

AWS CloudFront Custom SSL Certificate disabled

我看过很多关于这个主题的帖子,但我无法解决这个问题,所以我发布了我的设置,以防有人知道需要更改什么?

  1. 我有一个通过 Namecheap 购买的域名。我已经设置了自定义 DNS 并添加了 4 个由 AWS Route 53 中的托管区域生成的名称服务器。通过 whois.net 进行的 DNS 查找显示了正确的值。

  2. 在 Route 53 中,我已将 A 记录添加到 Alias Target xxxxxxxxxxxxxx.cloudfront.net. 因此流量到达 Route 53 并转到 CloudFront。

  3. 在 CloudFront 中,我有一个发行版。作为备用域名 (CNAME),我有以下值:

    • *.domain.com
    • www.domain.com
    • domain.com
  4. 在 origins 下,我有一个包含以下源域名的记录:

    • domain.com.s3-website.az-名称-1.amazonaws.com
  5. 我在 S3 存储桶中托管网站。所有 HTTP 请求都设置为重定向到 HTTPS。

  6. 最后,我为以下域名创建并验证了一个证书:domain.com, www.domain.com, *.domain.com

我已经阅读了一些答案,我应该等待,自定义 SSL 证书选项将被启用。然而,现在已经超过一天了,没有任何迹象表明会发生这种情况。

我的网站可以正常运行,但错误配置的证书(使用默认 *.cloudfront.net)会在 Safari 中弹出警告窗口,更糟糕的是,Chrome 中会出现警告页面,大多数人都不会绕过.

To use an ACM Certificate with Amazon CloudFront, you must request or import the certificate in the US East (N. Virginia) region. ACM Certificates in this region that are associated with a CloudFront distribution are distributed to all the geographic locations configured for that distribution.

http://docs.aws.amazon.com/acm/latest/userguide/acm-regions.html

CloudFront 不像大多数其他服务那样是区域性服务。这是一项全球服务,只有一个本地区域 -- us-east-1。它看不到任何其他区域的 ACM 证书(如果您想将它们与 Elastic Beanstalk 或 Elastic/Application 负载均衡器一起使用,您可以在其他区域创建证书)。

根据您的描述,您没有在 us-east-1 中创建 ACM 证书。

在 us-east-1 中创建一个新证书,使用它的选项应该几乎立即在 CloudFront 中可用。