Reputation: 283
I have a working domain, x.y, which is tied to an EC2 instance on a VPC.
I want a path on that domain, x.y/z, to be routed to an external, non-AWS (IPv4*) microservice. Can this be done with ALB?
I have followed Use Path-Based Routing with Your Application Load Balancer to set up target groups, but can't seem to link them to anything past EC2 instances?
(*: Would be great to extend with ports, or even (sub)domains, paths, etc.)
Upvotes: 3
Views: 6339
Reputation: 1
I also have similar requirement. I want to forward request to external AWS TargetGroup to save ConnectionTime and DNS Resolution time. Both the Account infra are within my company network so it will be possible to forward path based request from one aws ALB to another AWS api. I tried to create rule to forward request, there it is asking to select TG which is listing only TGs belong to current VPC. Not sure how can i point to TG of another AWS account.enter image description here
Upvotes: 0
Reputation: 2349
The latest AWS Application Load Balancer (ALB) can do the trick. This works for me
Follow the steps here,
1. Set up the ALB AWS documentation here, Follow steps up until Listeners tab,
2. On the Listeners tab, 2.1. Modify rules in the Listeners ID
This should redirect you to external URL
Upvotes: 3