【问题标题】:Can't use AWS cloudfront with custom SSL cert from IAM无法将 AWS Cloudfront 与来自 IAM 的自定义 SSL 证书一起使用
【发布时间】:2016-09-02 14:17:06
【问题描述】:

我有一个 CloudFront 分配,我想使用自定义证书设置 SSL。

我们想使用我们已经上传到 IAM 的 SSL 证书(我们目前正在为一些 ELB 使用),但它甚至不允许我们选择选项(证书所在的下拉菜单)应该是空的)。

有什么想法吗?根据官方文档,这应该是一个有效的选项

PS:我们不想使用 aws 证书管理器提供的证书

【问题讨论】:

    标签: amazon-web-services ssl amazon-cloudfront


    【解决方案1】:

    为 ELB 上传的自定义证书不能用于 CloudFront。

    所以你需要再次上传 SSL 证书(可以是同一个证书),但略有不同。

    aws iam upload-server-certificate \
      --server-certificate-name CertificateName \
      --certificate-body file://public_key_certificate_file \
      --private-key file://privatekey.pem \
      --certificate-chain file://certificate_chain_file \
      --path /cloudfront/DistributionName/
    

    来源:https://aws.amazon.com/premiumsupport/knowledge-center/cloudfront-custom-certificate/

    注意--path参数开头的/cloudfront/

    因此,最终,您将存储两个证书,一个供 ELB 使用,一个供 CloudFront 使用。但它们可以来自相同的证书源文件。

    【讨论】:

      【解决方案2】:

      您必须使用云端路径上传

      aws iam upload-server-certificate --server-certificate-name CertificateName --certificate-body file://public_key_certificate_file --private-key file://privatekey.pem --certificate-chain file://certificate_chain_file --path /cloudfront/path/
      
      --path Parameter – When you upload the certificate to IAM, the value of the -path parameter (certificate path) must start with /cloudfront/, for example, /cloudfront/production/ or /cloudfront/test/. The path also must end with a /.
      

      详情在这里 http://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/SecureConnections.html

      【讨论】:

        【解决方案3】:

        根据我的经验,如果您将 IAM 证书上传到 /cloudfront 目录,则可以在 ELB 上使用它。但是,您不能在 CloudFront 上使用不在 /cloudfront 目录中的 IAM 证书。

        【讨论】:

          猜你喜欢
          • 1970-01-01
          • 2015-04-20
          • 1970-01-01
          • 2017-04-13
          • 2014-10-14
          • 1970-01-01
          • 2015-12-17
          • 2020-07-20
          • 2011-04-08
          相关资源
          最近更新 更多