【问题标题】:(Bug) Elasticloadbalancer cant find ACM certificates with arn cloudformation(Bug) Elasticloadbalancer 找不到带有 arn cloudformation 的 ACM 证书
【发布时间】:2018-08-31 09:34:05
【问题描述】:

在 cloudformation 中,我向负载均衡器添加了两个侦听器。 (HTTP 和 HTTPS) 当我尝试在 cloudformation 中添加亚马逊拥有的证书时,它无法以任何方式找到该证书。我首先尝试使用自签名证书,该证书在 Amazon GUI 中的任何地方都不起作用。因此,我决定添加一个 Amazon 托管证书作为替代方案,该证书可以在负载均衡器的 GUI 中找到。

但是当我在 cloudformation 中使用 ACM 证书时,它总是无法通过 ARN 导入。 在 Cloudformation 构建期间总是弹出以下错误:找不到证书。 这是一个错误还是我做错了什么?

我目前正在使用这个负载均衡器:AWS::ElasticLoadBalancingV2::LoadBalancer

希望我能为这个错误得到一个有用的答案。

【问题讨论】:

    标签: amazon-web-services ssl-certificate amazon-cloudformation


    【解决方案1】:

    可以分享一下相关的cloudformation sn-p吗?证书在 ACM 中的状态是什么?确保它是Issued

    同时,共享工作 cloudformation 模板 sn-p。

    我将负载均衡器证书 ARN 作为输入参数:

      LoadBalancerCertificateARN:
        Type: String
        Default: arn:aws:acm:ap-northeast-1:xxxxxxxxxxxx:certificate/2d75cbe6-c1bb-286c-9cf4-34cc4f35b59c
        Description: Enter certificate ARN; Use ACM to create a certificate before creating this stack
    

    还有,这是我的 HTTPS 监听器 sn-p:

      PrivateALBHttpsListener:
        Type: 'AWS::ElasticLoadBalancingV2::Listener'
        Properties:
          Certificates:
          - CertificateArn: !Ref LoadBalancerCertificateARN
          DefaultActions:
          - TargetGroupArn: !Ref PrivateDefaultTargetGroup
            Type: forward
          LoadBalancerArn: !Ref PrivateALB
          Port: 443
          Protocol: HTTPS
    

    希望对你有帮助。

    【讨论】:

    • 我有完全相同的...当我在没有 HTTPS 侦听器的情况下进行设置时,它工作正常。在使用 https 监听器更新 cloudformation 后,它现在可以工作了。它似乎是 cloudformation 中的一个错误。
    • 对不起,我没有得到你。现在只通过retying就可以工作了吗?
    • 不...首先我添加了没有 HTTPS 侦听器的整个配置。添加该配置后,我添加了 HTTPS 配置。
    • CloudFormation 在这个意义上是非常无用的,AWS 控制台也是如此 - CloudFormation 表示找不到证书,而不是证书已过期并且控制台也没有调用它。
    【解决方案2】:

    据我了解,CloudFormation 在AWS-Specific Parameter Types 列表中没有 ACM 证书,因此无法轻松检索可用 ACM 公共证书列表以供选择。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2020-10-23
      • 2016-09-03
      • 2018-12-27
      • 2021-12-19
      • 1970-01-01
      • 2018-10-12
      • 2023-03-11
      • 2022-11-10
      相关资源
      最近更新 更多