How to setup Let's Encrypt's certificate in AWS Elastic Load Balancer

Viewed 5027

I have a apache server running on amazon linux 2. I have installed SSL/TLS using Lets Encrypt and certbot. Now, my website is properly running on https. Now, I want the CDN service of cloudfront. When I tried to create a load balancer it requires a SSL/TLS certificate. In this case, can I provide my certbot certificate in load balancer? If yes, then in which directory my certificate lies in apache?

2 Answers

can I provide my certbot certificate in load balancer?

Yes, but AWS provides own certificates which is more convenient than let's encrypt (at my opinion). Anyway you need to use AWS certificate manager to register AWS certificate or your own RapidSSL, Let's Encrypt, etc... certificate. If you want to register own certificate you must to provide 1. server secret key, 2. certificate, 3. certificate chain.

If yes, then in which directory my certificate lies in apache?

Run

grep -R "SSLCertificateFile" /etc/{APACHE_FOLDER}/conf.d/*
grep -R "SSLCertificateKeyFile" /etc/{APACHE_FOLDER}/conf.d/*
grep -R "SSLCertificateChainFile" /etc/{APACHE_FOLDER}/conf.d/*

Where {APACHE_FOLDER} is apache2 or httpd

When installing your certificate inside your Amazon Linux 2 instance, you only made it available for that specific instance. You need to either import your current certificate or request a new one in AWS ACM. Then you will have that certificate available for all services (including the load balancer you want) in the same AWS Region.

Related