I want to be able to use multiple, dynamic subdomains, for account holders, while also having an api subdomain. Essentially something like below:
https://example.com --> Angular 4 public landing page app
https://api.example.com --> NodeJS api
https://otbs.example.com --> Angular 4 SaaS application
https://test-account.example.com --> Angular 4 SaaS application
The public landing page app is just an Angular 4 app for the public facing application, whereas the SaaS application is the actual application itself, for when users are logged in, and is mapped to a subdomain as per their linked account.
I am using NodeJS, Express 4, Angular 4, and the Angular CLI. My intention would be to use S3 for serving the client Angular applications, while having the NodeJS API run in ElasticBeanstalk.
Is this configuration possible? I have looked in virtual hosting on AWS, but this isn't necessarily what I'm looking for as I need the ability to register a new subdomain every time a new account is created.