2

我正在尝试使用带有多个 Docker 容器的 eb cli 创建一个 eb 应用程序。我有一个在 2 个端口上运行的应用程序,所以我需要监听这些端口。我在您的设备上尝试了您的配置,.ebextensions/elb-listeners.config 但遇到ERROR: Service:AmazonCloudFormation, Message:Template error: instance of Fn::GetAtt references undefined resource AWSEBLoadBalancer. 下面是我的配置。

option_settings:
  aws:elb:listener:8745:
    ListenerProtocol: HTTP
    InstanceProtocol: HTTP
    InstancePort: 8745
  aws:elb:listener:3517:
    ListenerProtocol: HTTP
    InstanceProtocol: HTTP
    InstancePort: 3517

Resources:
  port8745SecurityGroupIngress:
    Type: AWS::EC2::SecurityGroupIngress
    Properties:
      GroupName: {Ref : AWSEBSecurityGroup}
      IpProtocol: tcp
      ToPort: 8745
      FromPort: 8745
      SourceSecurityGroupName: { "Fn::GetAtt": ["AWSEBLoadBalancer", "SourceSecurityGroup.GroupName"] }
      SourceSecurityGroupOwnerId: { "Fn::GetAtt": ["AWSEBLoadBalancer", "SourceSecurityGroup.OwnerAlias"] }
  port3517SecurityGroupIngress:
    Type: AWS::EC2::SecurityGroupIngress
    Properties:
      GroupName: {Ref : AWSEBSecurityGroup}
      IpProtocol: tcp
      ToPort: 3517
      FromPort: 3517
      SourceSecurityGroupName: { "Fn::GetAtt": ["AWSEBLoadBalancer", "SourceSecurityGroup.GroupName"] }
      SourceSecurityGroupOwnerId: { "Fn::GetAtt": ["AWSEBLoadBalancer", "SourceSecurityGroup.OwnerAlias"] }

你知道我错过了哪里吗?我是 AWS 的新手,很抱歉我的无知。您的帮助将不胜感激。

谢谢!

4

0 回答 0