4
votes

For my nodejs application in Elastic BeanStalk, without Beanstalk Load Balancer I want to set up a Letsencrypt certificate and keep the classic domain provided by AWS : xxx.xxxx.elasticbeanstalk.com

After several searches I found two possible solutions :

1 - Using an .ebextensions file => to install Certbot, get a Letsencrypt certificate and config Nginx.

great post about that => https://bluefletch.com/blog/domain-agnostic-letsencrypt-ssl-config-for-elastic-beanstalk-single-instances/

2 - From an ssh connection, install Certbot, generate a certificate and Upload it to IAM AWS.

Docs AWS : https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/configuring-https-ssl-upload.html

For both solutions I have the same error message during domain verification by Certbot.

I think that the directory generated by certbot for the verification isn't accessible..

Error :

To fix these errors, please make sure that your domain name was
entered correctly and the DNS A/AAAA record(s) for that domain
contain(s) the right IP address.

So, my question is : What's the best way to setup a SSL Certificate to get the green lock for a Node Js Elastic BeanStalk application without Beanstalk Load Balancer ?

Thank you for your help.

1
Are you trying to get a certificate for elasticbeanstalk.com? You can only obtain certificates for domains that you own, and I'm pretty sure Amazon owns that domain. If you register your own domain and then get a certificate, you should be able to install it onto your instance.Brian
@Brian Actually, I don't have a domain name and in this case i can't use AWS Certificate Manager. I use this application as webhook to communicate with the Facebook API. that's why I need an encrypted connection. Thank you for your answer. I finally find the solution. I created a git for that github.com/SammyHam/…Sam

1 Answers

3
votes

I finally found the solution :

I took inspiration from this script and created one using WEBROOT MODE.

I created a git to share this solution :

https://github.com/SammyHam/LetsEncrypt-SSL-config-for-Elastic-Beanstalk