Haichen  Liu
Haichen Liu

Reputation: 73

Elastic Load Balance Config for Node.js and AWS EB

I am trying to deploy a Node.js Express server to AWS EB, but have some problem to config the proxy.

If I have no elasticloadbalancing.config file under the extension folder, then I can access to the server through HTTP and port 3000. However if I want to add a config to enable the HTTPS and proxy the listener port 433 to instance port 3000, then the site cannot be loaded.

Here is my Config file,

option_settings:
  aws:elb:listener:443:
    ListenerProtocol: HTTPS:
    SSLCertificationeId: arn****
    InstancePort: 3000
    InstanceProtocol: HTTP

Could anyone give me any suggestions?

I am not sure if the EB is correctly configured, because once I deployed the config file, all ports in the Load Balancing in the web tier configuration were off. Will the EB use the loading balance automatically?

Here is the web tier config, Here is the web tier config

And here are listeners And here are listeners

Thanks.

Upvotes: 1

Views: 591

Answers (1)

Shibashis
Shibashis

Reputation: 8421

You will need to specify config for opening the instance port access from the ELB.

Resources:
  sslSecurityGroupIngress:
    Type: AWS::EC2::SecurityGroupIngress
    Properties:
      GroupId: {"Fn::GetAtt" : ["AWSEBSecurityGroup", "GroupId"]}
      IpProtocol: tcp
      ToPort: 3000
      FromPort: 3000
      SourceSecurityGroupName: {"Fn::GetAtt" : ["AWSEBLoadBalancer" , "SourceSecurityGroup.GroupName"]}

Please see the documentation available at

http://docs.aws.amazon.com/elasticbeanstalk/latest/dg/configuring-https-elb.html

Upvotes: 1

Related Questions