aws-amplify / amplify-hosting

AWS Amplify Hosting provides a Git-based workflow for deploying and hosting fullstack serverless web applications.
https://aws.amazon.com/amplify/hosting/
Apache License 2.0
459 stars 116 forks source link

Wildcard subdomains in AWS Amplify #44

Closed cjimenezber closed 11 months ago

cjimenezber commented 5 years ago

So we recently decided to remove server side rendering from our react app to use Amplify, since it provides us all that we need (serverless, high availabilty, speed and no need to test in two environments).

However now I have a question regarding how to configure AWS Amplify to have a wildcard CNAME record. I want that any subdomain can reach my app, not just the ones I manually select in the Amplify Console.

I have a wildcard CNAME in Route 53 pointing to the cloudfront, and the subdomains I added manually in the console are working, but the ones that are not (due to the nature of the wildcard CNAME), just get a 403 from cloudfront.

Is there support for wildcard subdomains in Amplify?

How does one configure it? Assuming there is no support for this.

Is there an API I can use to create the Amplify subdomains for me rather than doing it manually everytime a client purchases access?

mits87 commented 3 years ago

+1, guys we really need that functionality! We have above 5000 customers with custom subdomain, so because of that problem we can't use Amplify at all.

Right now we moved back to the Vercel solution because of that. I'm looking forward to have a proper solution in Amplify.

DiegoArrieta commented 3 years ago

+1 please support multi tenancy apps!!

fangzhouli commented 3 years ago

+1

brayann commented 3 years ago

👍 for this

Ilya93 commented 3 years ago

+1

boricic commented 3 years ago

👍 for this

rababahmed commented 3 years ago

+1

zgr024 commented 3 years ago

The solution I found was to ask AWS for a limit increase for subdomains in the region you want for all apps in the region and use Route 53 to automatically add the CNAMEs when a new subdomain is added via the SDK (will not work in console past 50).

Wildcard certificates are dangerous and not recommended anyway. If you want to handle 404s at the subdomain level, you can just add a * CNAME in Route 53 and point it to a separate web server with a wildcard cert. Then either redirect back to your application or display your 404 page.

kyashrathore commented 3 years ago

@mits87 How are you using vercel for it?

They provide wild card support.

But how yo are asking them to point their custom domain to your wildcard domain?

dgl9 commented 3 years ago

+1 for wildcard support

Let's get this rolling.. where is the classic Amazon Customer Obsession?

DanielOverdevest commented 3 years ago

+1 for wildcard subdomain support to have a subdomain for all of our clients. Now I have to do it manually.

terryds commented 3 years ago

+1 for wildcard domain support

r-moore commented 3 years ago

+1

dgl9 commented 3 years ago

Hey guys we are actively looking at designing a solution for this. We will update this thread soon with a plan.

Any update on this?

shaun-wild commented 3 years ago

+1

DilwoarH commented 3 years ago

+1 for multi tenancy support

lisbuenas commented 2 years ago

+1

Matheusgfgl commented 2 years ago

+1

olivierpichon commented 2 years ago

@abhi7cr, @VividKnife, @swaminator,

Could you guys let us know if there is an underlying issue as to why this can't be implemented easily? From an external point of view (which may not have the full picture), it feels like the underlying Cloudfront distribution(1) and Certificate Manager(2) should support wildcard.

This feature would come a long way to achieve sophisticated multi-tenancy (one user can belong to many accounts / orgs) and would further help Amplify to gain an enterprise-ready reputation.

Thanks!

(1) https://aws.amazon.com/about-aws/whats-new/2013/09/18/amazon-cloudfront-announces-wildcard-cname-support/ (2) https://docs.aws.amazon.com/acm/latest/userguide/acm-certificate.html

marceloch2 commented 2 years ago

+1

johnstan commented 2 years ago

+1

RyanTheDevGuy commented 2 years ago

+1

hassanabbasi commented 2 years ago

+1

marco-debortoli commented 2 years ago

+1

Drnoodle commented 2 years ago

Hello,

I encountered the same problem while developing a project. I solved it by implementing a reverse ssl proxy with the following features :

Would you be interested in a service that would handle this issue for you for a price between 100 and 400 dollars per month?

Let me know by putting a 👍 beside this comment.

Hugo

drashtibpatel commented 2 years ago

+1 for wildcard domain/subdomain support

lisbuenas commented 2 years ago

At moment solved without Amplify, combining Codepipeline with S3 bucket and configuring the wildcard subdomain to a root application, to map subdomain and configure the application on runtime.

zgr024 commented 2 years ago

I solved this issue by using the AWS SDK to create/update the subdomains as needed. I did this after asking them to increase my limits which was a feat in and of itself. No need for wildcards anymore.

dgl9 commented 2 years ago

Could migrate to S3 + Cloudfront + route53 wildcard?

Also vercel https://vercel.com/blog/wildcard-domains seems to support wildcard domains if you're using nextjs or create-react-app..

Amplify has been great otherwise, any transparency regarding blockers to get this done? @ferdingler

tasarsu commented 2 years ago

+1 Amplify is great we already use it but it would be much more great to have wildcard subdomain support for multi tenant applications

osnodegeoffrey commented 2 years ago

+1

LuckyBeardDev commented 2 years ago

+1

simo97 commented 2 years ago

+1

hsynakgul commented 2 years ago

+1

SaqibZafar commented 2 years ago

+1

neilferreira commented 2 years ago

+1

nuriakman commented 2 years ago

+1

bronzemoon81 commented 2 years ago

+1

3rkan0zturk commented 2 years ago

+1

DominikScholz commented 2 years ago

+1

martineisele commented 2 years ago

+1

manikpokhetra79 commented 2 years ago

+1

MattTimmons commented 2 years ago

+1

digitalhurricane-io commented 2 years ago

+1

nikitastryuk commented 2 years ago

+1

sanchojaf commented 2 years ago

+1

othman-albakri commented 2 years ago

@aws-amplify-ops , Is there any plan to support wildcard or not , so we can search for other options

chudinovskikh commented 2 years ago

+1

nick-bir commented 2 years ago

+1

alex-karo commented 2 years ago

+1