AWS Elastic Beanstalk environment with multiple Load Balancers

后端 未结 5 829
天命终不由人
天命终不由人 2021-02-07 12:06

I have the following situation: I have 1 Rails App that has 2 domains, each of these domains has multiple/dynamical subdomains. This app is in AWS using a load-balanced Elastic

5条回答
  •  南方客
    南方客 (楼主)
    2021-02-07 12:46

    This worked for me,

    First, create the load balancer

    aws elb create-load-balancer --load-balancer-name my-load-balancer --listeners "Protocol=HTTP,LoadBalancerPort=80,InstanceProtocol=HTTP,InstancePort=80" "Protocol=HTTPS,LoadBalancerPort=443,InstanceProtocol=HTTP,InstancePort=80,SSLCertificateId=arn-of-certificate" --subnets eb-subnet-of-primary-elb --security-groups sg-of-primary-elb
    

    Then, attach load balancer to primary auto scaling group of EB env

    aws autoscaling attach-load-balancers --auto-scaling-group-name asg-name-of-primary-asg-in-eb --load-balancer-names my-load-balancer
    

提交回复
热议问题