- Newest
- Most votes
- Most comments
Elastic load balancers are one of several services that can make use of certificates from Amazon Certificate Manager.
A full list is here https://docs.aws.amazon.com/acm/latest/userguide/acm-services.html
1. Using a Load Balancer (Recommended)
If you are hosting your site on EC2 instances or behind a Load Balancer, you will need to use an Application Load Balancer (ALB) or Network Load Balancer (NLB) to attach the certificate. ELBs can distribute incoming traffic across multiple targets (like EC2 instances) and handle SSL termination.
Steps to Attach the Certificate:
Request or Import an SSL Certificate in ACM:
Go to AWS Certificate Manager.
Request a certificate for your domain (e.g., www.yourdomain.com).
Validate the domain using either DNS or email validation.
Create an Application Load Balancer (ALB):
Go to the EC2 Dashboard and select Load Balancers.
Create a new ALB, and select the HTTPS protocol for the listener.
In the listener settings, choose the ACM certificate you just requested.
Define target groups for your backend instances (EC2, ECS, etc.).
Attach the ALB to Your Domain:
Use Route 53 (or your domain registrar) to point your domain to the ALB using an Alias Record.
2. Without a Load Balancer (Alternative)
If you are hosting your site directly on a single EC2 instance without a Load Balancer, you cannot attach an ACM certificate directly to the instance. However, you can still configure SSL/TLS by installing the certificate manually on the web server (e.g., Apache, Nginx).
Manual Setup:
Request or Download the Certificate from ACM.
Install the Certificate on Your Web Server:
For Apache: Configure the SSLCertificateFile, SSLCertificateKeyFile, and SSLCertificateChainFile in your virtual host settings.
For Nginx: Configure the ssl_certificate and ssl_certificate_key directives in your server block.
Update Security Groups:
Ensure port 443 (HTTPS) is open in your EC2 security group.
Relevant content
asked 2 years ago
asked 2 years ago
