Overview
I am building a multi tenant SaaS platform on AWS. The deployment architecture for now is very simple.
Everything is in a VPC and the EC2 and RDS are in private subnets,
Problem
I would prefer my clients (tenants) to have their own domain name. For e.g. Let's say that right now my application is accessible at the URL http://xyz-elb.amazon.aws.com
I would like to enable my clients to access the application using
and so one. I know this is possible because I have seen this in different multi tenant SaaS applications.
Research I have done till now: I read about reverse proxy which can accomplish it however, I didn't get any reliable link. Tried reading about HAProxy but I feel that I am going in the wrong direction.
What I need
Expert opinion on different ways to do domain mapping
List & Link of resources which address this particular problem
Any practical experience or case studies by any of you cool guys here
A cheap solution (I don't want to go via Amazon API Gateway / Route53 Policies which doesn't seem to fit my need)
Thank you so much for reading my question. And thanks in advance for your efforts to reply on this.
Just create a DNS CNAME resource record in each tenant domain, pointing to your apps ELB DNS name.
I prefer to alias the ELB DNS name to my service domain, then alias the tenant domain to it. Example:
app.example.com IN CNAME my-loadbalancer-1234567890.us-west-2.elb.amazonaws.com
Then in my tenant DNS:
app.tenant1.com IN CNAME app.example.com.
This aliasing allows you to change your ELB endpoint if required, without having to change the DNS records for all clients.