amazon-web-services - 如何使用 Cloud Formation 为 CloudFront 发行版配置 ACM 证书

标签 amazon-web-services ssl ssl-certificate amazon-cloudfront aws-cloudformation

我正在尝试使用 Cloud Formation 在我的 CloudFrontDistribution 中设置证书。

我的证书已通过证书管理器颁发。它已获得批准,并且我已验证该证书是否可以直接通过 CloudFront 控制台手动配置来工作。

在我的 CloudFormation 模板中,我尝试使用与 IamCertificateId 属性中的证书关联的 IdentifierARN 值:

"ViewerCertificate" : {
  "IamCertificateId" : "********",
  "SslSupportMethod": "sni-only"
}

但是在这两种情况下我都会收到以下错误:

The specified SSL certificate doesn't exist, isn't valid, or doesn't include a valid certificate chain.

阅读 DistributionConfig Complex Type 的文档看起来有一个“ACMCertificateArn”属性,但这似乎无法通过 CloudFormation 工作。

如有任何帮助,我们将不胜感激。

最佳答案

Cloudformation 添加了此属性,但未记录。您可以像这样轻松使用:

"ViewerCertificate": {
            "SslSupportMethod": "sni-only",
            "AcmCertificateArn": "CERTIFICATE_ARN"
}

请注意,证书必须在 us-east-1 区域创建,否则将不被接受。

关于amazon-web-services - 如何使用 Cloud Formation 为 CloudFront 发行版配置 ACM 证书,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35914161/

相关文章:

java - 获取 javax.net.ssl.SSLHandshakeException : Connection closed by peer in Android 5. 0.2

java - KeyStoreException : No private keys found in keystore with not-yet-commons-ssl-0. 3.11.jar

safari - Amazon S3 图像的临时 URL 在 IE 和 Firefox 中有效,但在 Safari 中无效

c# - 奇怪的 tcpclient https 发布响应

ssl - 如何在 debian 8.5 上将 phpMyAdmin 4.2.12 设置为仅 ssl

c# - System.Net.CertificatePolicy 到 ServerCertificateValidationCallback 接受所有证书策略

apache - 如何在 AWS 弹性负载均衡器上实现 HTTP 严格传输安全 (HSTS)?

amazon-web-services - 生产 Kubernetes 节点的安全最小磁盘大小是多少?

reactjs - 使用 Amplify 保留 AWS Cognito 用户

php - 如何修复 SSL 证书验证失败