Amazon web services 在云形成中创建网络负载平衡时出错

Amazon web services 在云形成中创建网络负载平衡时出错,amazon-web-services,yaml,amazon-cloudformation,amazon-elb,Amazon Web Services,Yaml,Amazon Cloudformation,Amazon Elb,我正在尝试在Cloudformation中创建网络矿脉平衡,但由于以下错误而导致堆叠失败 错误:侦听器协议“TCP”必须是“HTTP,HTTPS”之一(服务:AmazonElasticLoadBalancingV2;状态代码:400;错误代码:ValidationError # Target Group LPTargetGroup: Type: AWS::ElasticLoadBalancingV2::TargetGroup Properties: HealthCheckInter

我正在尝试在Cloudformation中创建网络矿脉平衡,但由于以下错误而导致堆叠失败

错误:侦听器协议“TCP”必须是“HTTP,HTTPS”之一(服务:AmazonElasticLoadBalancingV2;状态代码:400;错误代码:ValidationError

  # Target Group
 LPTargetGroup:
Type: AWS::ElasticLoadBalancingV2::TargetGroup
Properties:
    HealthCheckIntervalSeconds: 30
    HealthCheckProtocol: TCP
    HealthCheckPort: 450
    HealthCheckTimeoutSeconds: 10
    HealthyThresholdCount: 3
    Name: !Ref TargetName
    TargetType: instance
    Port: 450
    Protocol: TCP
    TargetGroupAttributes:
    - Key: deregistration_delay.timeout_seconds
      Value: '20'
    Targets:
    - Id:
        Ref: WebEC2Instance1
      Port: 450
    - Id:
        Ref: WebEC2Instance2
      Port: 450
    - Id:
        Ref: WebEC2Instance3
      Port: 450                 
    UnhealthyThresholdCount: 3
    VpcId:
      Ref: 'Vpc'
    Tags:
    - Key: Name
      Value: LPTargetGroup
    - Key: Port
      Value: 450

#ELB (NLB)
NLBListener:
Type: AWS::ElasticLoadBalancingV2::Listener
Properties:
    DefaultActions:
      - Type: forward
        TargetGroupArn: !Ref LPTargetGroup
    LoadBalancerArn: !Ref LPNetworkLoadBalancer
    Port: '80'
    Protocol: TCP
    Port: '443'
    Protocol: TCP
LPNetworkLoadBalancer:
Type: AWS::ElasticLoadBalancingV2::LoadBalancer
Properties:
  Name: Lp-Web-NLB
  Scheme: internal
  Subnets:
   - !Select [ 0, !Ref Subnets ]
   - !Select [ 1, !Ref Subnets ]
   - !Select [ 2, !Ref Subnets ]

我如何解决这个问题?

这回答了你的问题吗?这回答了你的问题吗?