0

I'm developing a SaaS application on Amazon Elasticbeanstalk: my-saas.com and for every registered user my app create custom subdomain username.my-saas.com with wildcard SSL.

I'm trying to develop new feature custom domains. Users will be able to choose between a subdomain and their domain like app.my-user-domain.com.

I know this will require the user to add a CNAME DNS record pointing to... my Elasticbeanstalk Instance or my subdomain?

And how can I set SSL for this domains automatically on AWS?

qubishoun
  • 127
  • 1
  • 7

1 Answers1

2

You would need to request an SSL certificate from the ACM service for the customer's domain, then Amazon would give you a DNS record to create in the my-user-domain.com DNS server. You would then have to ask your users to create that additional DNS record on their end, and then wait on the ACM service to validate the domain and issue the SSL certificate. After that you could add the SSL certificate to your load balancer.

I would have a form that the user enters their custom domain into, after which you could go ahead and create the SSL certificate request in AWS via the API. Then you could present them two DNS records to create:

  1. The DNS record they need to create, which will point to your SaaS application.
  2. The DNS record they need to create to validate the SSL certificate request.

Then you would need some method for the user to click a button in your application that says "I've created those DNS records". When that happens you would query the AWS API to see if the SSL certificate has been issued by Amazon yet, and if so attach it to the load balancer. If it has not been issued yet you would have to tell the user to try again later.

Mark B
  • 183,023
  • 24
  • 297
  • 295