1
votes

I have deployed a node.js app to Elastic Beanstalk. When I try to access the page via HTTP: everything works fine. when I try to access via HTTPS: I get a refused to connect error. I have followed the instructions on

https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/https-singleinstance-nodejs.html

I created a .ebextensions folder and my https-instance-single.config looks like:

Resources:
  sslSecurityGroupIngress: 
    Type: AWS::EC2::SecurityGroupIngress
    Properties:
      GroupId: {"Fn::GetAtt" : ["AWSEBSecurityGroup", "GroupId"]}
      IpProtocol: tcp
      ToPort: 443
      FromPort: 443
      CidrIp: 0.0.0.0/0

I have uploaded and deployed the new zip file with these included and still the same thing. I can access via HTTP but not via HTTPS.

Any help would be greatly appreciated.

1
do the logs point to any errors? Could it be a certificate issue. SSL listeners need to be associated with SSLCertificateId/SSLCertificateArns depending on whether you are using a classic or an application load balancer. - progfan
just do exactly what the documentation say. there are 2 files you need to add. not just one - Emeka Obianom

1 Answers

0
votes

I would suggest you use LetsEncrypt for Elastic Beanstalk single instance. According to your current configuration, its only open port 443 to serve HTTPS but you are not pointing to certificate. This is the tutorial for LetsEncrypt SSL on Elastic Beanstalk: https://www.tutcodex.com/ssl-on-single-instance-elastic-beanstalk-tutorial/