有大量的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和key的正确组合,以使SSL在Cloudfront上运行?