我正在尝试为一个子域创建一个Cloudfront分发,例如dev.example.com。但是,在添加了对象来源的详细信息后,我进入备用域名(CNAMES)部分并添加: dev.example.com当我单击create distribution时,我得到以下错误:
com.amazonaws.services.cloudfront.model.InvalidViewerCertificateException: To add an alternate domain name (CNAME) to a CloudFront distribution, you must attach a trusted certificate that validates your authorization to use the domain name. For more details, see: https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/CNAMEs.html#alternate-domain-names-requirements (Service: AmazonCloudFront; Status Code: 400; Error Code: InvalidViewerCertificate; Request ID: fb305ccd-21e7-4bf8-a55c-df1304c06ac1; Proxy: null)我正在通过路由53管理我的域名dns。我已经通过ACM创建了一个证书,但是选择自定义SSL证书的选项是灰色的。我已经浏览了AWS文档,到目前为止还找不到任何解决方案。
发布于 2020-07-22 01:20:16
此错误表示尝试使用的证书不正确。
对于CloudFront分发,您的ACM证书必须在us-east-1中创建。这是因为CloudFront是一个全局服务,全局服务只能附加us-east-1中存在的区域服务。它们还将出现在us-east-1区域下的CloudWatch和CloudTrail中。
它还必须覆盖您正在使用的域。在您的情况下,证书中必须包含dev.example.com或*.example.com。
发布于 2020-07-22 01:20:25
您必须在us-east-1中创建ACM证书。你说过吗?
https://stackoverflow.com/questions/63019586
复制相似问题