Trying to host multiple applications on AWS Lightsail with https
being allowable on all of them, but running into a problem. It appears as though the Lightsail load balancers only allow a single certificate to be active at one time. These sites are low-traffic so I would like to only have a single load balancer or ec2 instance for multiple domains that can support https
on all of them. Does AWS provide a way to do this that integrates with Lighsail or what is the recommended approach?
Hosting Multiple Domains with SSL on AWS Lightsail
Asked Answered
You are correct that LightSail balancers only support 1 certificate, but that single certificate can support up to 10 domain names.
One of the domains is the "main" one and the other (up to) 9 are "alternate" domains and subdomains, but operationally it doesn't make any difference which one is the "main" one and which ones are alternates.
Certificates are not editable, so if you already created one, you'll need to create a new one with all the domains, and attach it to the balancer.
I just figured this out for myself last night before going to bed and was about to update my answer. Thank you and I realize now why LightSail supports only two certificates, but only one can be active, so you can easily duplicate and modify as needed. All of the domain records end up being the same. This seems to be the most cost-effective method of obtaining an SSL certificate that I have found. –
Solenne
Indeed, and very simple once you understand the process. And if you leave those DNS validation records in place for all the domains, you'll find that the certificate is also automatically renewed next year, but they all have to remain present, since certificate issuance depends on all the domains being validated. –
Ostmark
Oh wow! Thanks, was wondering if the certificate would auto renew. That's good news. Learning AWS is quite the journey.. haha –
Solenne
© 2022 - 2024 — McMap. All rights reserved.