未定义的资源AWSEBLoadBalancer

时间:2017-07-28 05:40:10

标签: amazon-web-services aws-security-group ebextensions

我正在尝试使用带有多个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的新手,对我的无知感到抱歉。非常感谢您的帮助。

谢谢!

0 个答案:

没有答案