简体   繁体   中英

How to redirect some routes of an aws domain to Api Gateway and others to Load Balancer?

I'm a bit new to aws, I have a problem. I have a nestjs api deployed on EC2 and accessible through Application Load Balancer. Additionally I have a Serverless Api with Lambdas accessible through Api gateway.

I have configured my domain in Route 53 and I have also successfully configured it in API Gateway

But I need to use the same domain (Exactly the same domain, I don't need to set up subdomains) and that some routes of my api point to API Gateway and others to Application Load Balancer.

Is it possible to do this on AWS? How can I get it? Thanks for your help.

I need to configure something like that

www.mydomain.com/books -> Api Gateway

www.mydomain.com/students -> Api Gateway

www.mydomain.com/teachers -> Applicaion Load Balancer

www.mydomain.com/grades -> Application Load Balancer

You could create an AWS CloudFront distribution for your domain, and configure multiple origins (API Gateway and the Load Balancer) in CloudFront

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM