I have a two frontend apps served in two different amplify applications. I want to forward the request based on the path to different servers using an Application Load Balancer (I'm open to any other tool that you might suggest as well). For example:
But as far as I know, ALB path routing works with EC2 instances only. Is there a way to achieve this with two amplify instances?
I thought to create a EC2 instance with a tunnel to the amplify instance but I'm not sure if is the best solution.
The main goal of doing this is share the localstorage of these two applications in the same domain. So is important that the request is forwarded and not redirected to the amplify domains
Either ways, if you have in mind any other way to achieve this, I'm open to suggestions as well
That's true that ALB only supports instance, Ip or Lambda function only and no other AWS resources.
You can achieve your path based routing using CloudFront
Links -> reference 1 , reference2 , https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/distribution-web-values-specify.html#DownloadDistValuesPathPattern
My personal take on this:- amplify of course does help in development by taking away all the abstractions but at the same time you loose the control, instead if i were you i would have gone with ECS fargate with ALB combination which of course give me better control for future requirements and cost management.
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.