1

I'm trying to set up an SSL certificate for a project. I have the app hosted in AWS via a "single-instance elastic beanstalk application".

I have seen tutorials on how to do it when you are using a load-balancer, but I am not due to cost constraints (~$30/mth just to have that running, per application :S).

I have registered a domain via Route53. The site works via http://

I have a certificate issued/verified via AWS Certificate Manager. It says it's "In use? No" though (which seems to be the problem)! enter image description here

I've tried to add a file named to .ebextensions with the following code:

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 believe I've "opened" up port 443 via the S3 security group: enter image description here

Unsure what is wrong, as it is not able to reach https://www.fake.com.

Seems like there's a way to select the cert via the load-balanced method; do I have to do something similar?

Chris Allinson
  • 1,837
  • 2
  • 26
  • 39
  • 2
    You can't use that certificate unless you are also using an ELB or CloudFront. You have done nothing to associate that SSL certificate with an ELB or CloudFront so of course it isn't in use. If you want to use an SSL certificate on a single EC2 instance you have to install an SSL certificate directly on that instance, and you can't do that with ACM certificates. – Mark B Mar 13 '17 at 16:44
  • Understood ... will research that, thanks :) – Chris Allinson Mar 13 '17 at 16:54
  • I am trying to achieve same. But I have cloufront in place. Still I can't make it work. I keep redirected back to beanstalk url instead using my sub-domain. – Manoj Kumar Apr 19 '22 at 09:29

1 Answers1

0

Amazon Certificate Manager(ACM) doesn't support single instance. You can try LetsEncrypt if you want a free SSL for your website: https://www.tutcodex.com/ssl-on-single-instance-elastic-beanstalk-tutorial/

Devian
  • 1