那里有大量的Cloudfront问题,但谷歌搜索可能出现的问题仍然令我感到惊讶。这是我的......
我目前正在尝试的是将SSL证书上传到IAM,以便我可以使用Cloudfront的自定义域名(例如https://assets.mydomain.com
)。然而,这并不是那么顺利。证书是从DNSimple购买的。 AWS cli上传如下:
aws iam upload-server-certificate \
--server-certificate-name MyDomainProduction \
--path /cloudfront/ \
--certificate-body file://~/Downloads/STAR_mydomain_com/STAR_mydomain_com.crt \
--private-key file://~/Downloads/STAR_mydomain_com.key \
--certificate-chain file://~/Downloads/STAR_mydomain_com.pem
错误:
A client error (MalformedCertificate) occurred when calling the
UploadServerCertificate operation: Unable to validate certificate
chain. The certificate chain must start with the immediate signing
certificate, followed by any intermediaries in order. The index within
the chain of the invalid certificate is: 1
我想我已经尝试了500种不同的可能性,而且我的想法是为什么我不能让事情发挥作用。以下是我在工具箱中获取的DNSimple和Comodo交给我的内容:
STAR_mydomain_com.pem
STAR_mydomain_com.key
STAR_mydomain_com/AddTrustExternalCARoot.crt
STAR_mydomain_com/COMODORSADomainValidationSecureServerCA.crt
STAR_mydomain_com/COMODORSAAddTrustCA.crt
STAR_mydomain_com/STAR_mydomain_com.crt
什么是正确的crts,pem和密钥组合才能让SSL在Cloudfront上运行?