Reputation: 3864
Let's say I have web services at www.mydomain.com
and something.anotherdomain.com
(a hosted SaaS, for example). I want to set up a router on, say, xyz.mydomain.com
to send HTTP traffic to something.anotherdomain.com
if the URL path starts with /prefix
, and to www.mydomain.com
otherwise. Is this something ELB can be configured to do? It seems to encourage you to target by IP, but lets say that something.anotherdomain.com
doesn't provide a static IP for use with this.
As concrete examples, I'd like requests to map:
xyz.mydomain.com/prefix/heythere -> something.anotherdomain.com/prefix/heythere
xyz.mydomain.com/blahblah -> www.mydomain.com/prefix/heythere
Explicit question: is ELB the appropriate product for this routing, and if so how can it be configured?
Upvotes: 0
Views: 28
Reputation: 270294
No. Load Balancers cannot forward traffic to a Domain name.
From Target Groups for Your Application Load Balancers - Elastic Load Balancing:
The following are the possible target types:
instance
: The targets are specified by instance ID.ip
: The targets are IP addresses.lambda
: The target is a Lambda function.
What you describe sounds like a CNAME
DNS record. This allows you to say "When resolving Domain A, restart the domain name resolution using Domain B". You can configure CNAME
records in Amazon Route 53. This is commonly done for things like "treat requests for company1.com
as a request for company2.com
".
Upvotes: 1