Our white-labeling is quite simple, it’s only style changes, not really a multi-tenant application, all users still share the DB access and this is not a problem.
But let’s say that now example2.org is becoming a new customer. I now have to re-create the ACM certificate with the existing list I had plus the new one, and replace it in the CF distrib. Is this the best/unique solution to this problem? As there’s no such thing in CloudFront as multiple certificates in the same distribution.
We don’t expect the number of domains to grow much larger than a few dozen (so the (apparent) hard-limit of AWS of 100 domain names upon quote increase request is sufficient).
For CloudFront, you can attach a single cert with up to 100 SANs, but this isn’t great because you will leak your other customers in the cert every time someone visits the site, which looks tacky as well as possibly being a slight security/visibility concern for your other customers.
You’re better off making one distro per customer, as was already recommended. Multiple distributions can front the same origin, so your cost will be flat compared to trying to fit everything into a single cert.
This is the right answer. We have 28K+ Cloudfront distributions. We never share domain names on a single cloudfront distro. The cert management would be incredibly annoying. Also, tracking traffic is way easier with it split out.
Depending on what you are doing using (Caddy)[https://caddyserver.com/] could be an option. It does force you to do SSL term on the box which is not great, but it also lets you have someone point a CNAME at you and boom, working domain.
Outside of that, you could create a ACM cert programatically and tell them what DNS records to create to enable that, and then (using IAC or a simple script) create the CF distribution or API gateway or whatever you need.