Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
278 views
in Technique[技术] by (71.8m points)

amazon web services - Offering custom domains via a redirect. Issues with AWS API Gateway quotas

We're trying to add a service allowing premium users to have custom domains. In the first iteration this was supposed to be very simple: the user would add a CNAME record to an AWS API Gateway like https://xxxx111222333.execute-api.us-east-1.amazonaws.com, and a lambda function integration would check the original host, e.g. example-custom.com, and lookup in the database that this mapped to user bob-example, then redirect to our-app-domain.com/bob-example.

Whilst this isn't the most elegant solution, we wanted to test interest before going too heavy.

The problem is that API Gateway seems to have a limit of 120 custom domains. Whilst wildcard domains are possibly these do not help the above use case. If we asked the user to CNAME directly to the API gateway without adding the custom domain it seems to give a 403: forbidden if those accessing the gateway directly does work oddly.

Similarly, Cloudfront has a limit of 100 CNAMEs, so I don't think this could work as a lambda edge function.

Just looking for some suggestions on how to solve this?

question from:https://stackoverflow.com/questions/65930230/offering-custom-domains-via-a-redirect-issues-with-aws-api-gateway-quotas

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)
Waitting for answers

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...