aws-samples / eb-php-wordpress

Configuration files and instructions for installing WordPress securely and running it in a load balanced AWS Elastic Beanstalk environment with an EFS file system for shared assets.
Apache License 2.0
165 stars 95 forks source link

Unknown template resource: AWSEBLoadBalancer #5

Closed jbanahan closed 6 years ago

jbanahan commented 7 years ago

Following this tutorial

In the Launch an Elastic Beanstalk Environment section I keep getting this error after uploading and attempting to deploy

Unknown template resource: AWSEBLoadBalancer

mwunderl commented 7 years ago

Hi Fir3Chi3f, Your environment is missing a load balancer. Try adding one with the instructions here: Changing Environment Type

Thanks, -Michael

canfone commented 7 years ago

Hello ~

I am trying to create an eb application using eb cli with Multiple Docker Container. I have an applications running on 2 ports so I need to listen on those ports. I tried your configuration on your .ebextensions/elb-listeners.config but I encounter an error of ERROR: Service:AmazonCloudFormation, Message:Template error: instance of Fn::GetAtt references undefined resource AWSEBLoadBalancer. Below is my configuration.

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"] }

Do you know where did I miss? I'm a newbie in AWS so sorry for my ignorance. Your help will be much appreciated.

Thanks!

mwunderl commented 6 years ago

Try the instructions at Changing Environment Type. When you add a load balancer to your environment, Elastic Beanstalk creates a resource in CloudFormation named AWSEBLoadBalancer. If you don't want a load balancer, you can configure ingress rules on the instance security group, or create a new security group and configure Beanstalk to assign it to the instances. See these example configs- https-singleinstance-securitygroup.config securitygroup-addexisting.config

clearboxco commented 10 months ago

Hello ~

I am trying to create an eb application using eb cli with Multiple Docker Container. I have an applications running on 2 ports so I need to listen on those ports. I tried your configuration on your .ebextensions/elb-listeners.config but I encounter an error of ERROR: Service:AmazonCloudFormation, Message:Template error: instance of Fn::GetAtt references undefined resource AWSEBLoadBalancer. Below is my configuration.

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"] }

Do you know where did I miss? I'm a newbie in AWS so sorry for my ignorance. Your help will be much appreciated.

Thanks!

Hey, did you ever find a solution to this problem? I am encountering something very similar.