Warm tip: This article is reproduced from stackoverflow.com, please click
ssl openssl amazon-elastic-beanstalk

Install SSL certificates on Elastic Beanstalk

发布于 2020-04-05 00:24:07

I want to install SSL certificates in an Elastic Beanstalk environment, but I can't find a way to do it, neither uploading through the aws cli, nor adding files to the project.

I've read tutorials from namecheap* (where I purchased the certificate) and from Comodo (the guys who issue the certificate), but I still could not understand what to do. Both mention files that I could not identify. Please, I'd appreciate if you could shed a light in here: how to set up these SSL certificates?

I received 3 files:

  • www_brauliopf_com.ca-bundle
  • www_brauliopf_com.crt
  • www_brauliopf_com.p7b

My application is in AWS EB and it is a web app in node.js and express.js.

References (confusing tutorials):

* https://www.namecheap.com/support/knowledgebase/article.aspx/9637/68/how-can-i-complete-the-domain-control-validation-dcv-for-my-SSL-certificate?_ga=2.130240586.433149744.1580422349-1564553394.1580422349#ema

* https://comodosslstore.com/resources/how-to-install-ssl-certificate-on-aws-ec2-instance/

Questioner
brauliopf
Viewed
118
littleforest 2020-01-31 23:02

AWS offers free SSL certs that automatically renew through its Certificate Manager which are much easier to apply to your Elastic Beanstalk setup.

In either case, if you are using a Load Balancer, then that is where you need to apply your SSL cert. Go to Configuration -> Load Balancer. Make sure you have a port on 443 with the HTTPS protocol. And then you can add your SSL cert. If you are using certs from Certificate Manager, then you just select your cert and you're done. If you are using your own certs, then it will instruct you which ones to paste in to the form. It can be a little bit confusing, and at one point Elastic Beanstalk had a bug where it would tell you there was an error uploading your cert, but if you exited, it had actually uploaded successfully. Not sure if that has been fixed.

I suggest trying to get a refund from Comodo and using the free certs through SSL, or just cut your losses in the interest of ease, and use the free cert, just remembering to turn off any auto-renew with Comodo.