CodeDeploy: The specified load balancer does not exist

雨燕双飞 提交于 2019-12-25 00:17:56

问题


I'm trying to associate an ELB (NLB actually) with a CodeDeploymentGroup, using the prescribed format of ElbInfoList. This is in CloudFormation.

CodeDeploy won't have it. During deploy, it says,

> *The specified load balancer does not exist. for activityId="5" of activityType={Name:
> ExecuteCentralizedCommandOnInstanceActivity.runCentralizedCommand,Version:
> 1.00}*

My deployment group looks like so:

    "CodeDeploymentGroup" : {
      "Type" : "AWS::CodeDeploy::DeploymentGroup",
      …
      "Properties" : {…
        "LoadBalancerInfo" : {
          "ElbInfoList" : [ {
            "Name" : {
              "Fn::GetAtt" : [ "NetworkLoadBalancer", "LoadBalancerName" ]
            }
          } ]
        }
      }
    },

The Network Load Balancer:

    "NetworkLoadBalancer" : {
      "Type" : "AWS::ElasticLoadBalancingV2::LoadBalancer",
      "Properties" : {
        "Scheme" : "internet-facing",
        "Type" : "network",
        "Subnets" : [ {
          "Ref" : "Subnet1"
        }, {
          "Ref" : "Subnet2"
        } ]
      }

I've tried satisfy ElbInfoList's undefined requirements by with "LoadBalancerFullName" as well. It doesn't work.

The official example says to use a ref. This gives the same error as when using the "LoadBalancerFullName" attribute, which is,

The load balancer name … specified in elbInfoList exceeds the maximum allowed length of 32 characters. (Service: AmazonCodeDeploy; Status Code: 400; Error Code: InvalidLoadBalancerInfoException; Request ID: …)

What is the correct way to define the load balancer in the deployment group?

来源:https://stackoverflow.com/questions/54348919/codedeploy-the-specified-load-balancer-does-not-exist

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!