Reputation: 12433
I have two same task in a service.
this task has the httpd.
It has different IP address 56.XX.XX.12
,56.XX.XX.15
I can access both address and get response. 56.XX.XX.12
,56.XX.XX.15
Now I try to attach original domain name to this fargate though, from my understanding, I should access to LoadBalancer IP address and LoadBalancer select the target task automatically am I wrong?
If so where can I find the LoadBalancer IP?
Upvotes: 0
Views: 2230
Reputation: 199
Now I try to attach original domain name to this fargate though, from my understanding, I should access to LoadBalancer IP address and LoadBalancer select the target task automatically am I wrong?
AWS elastic/application load balancers do not have a static IP, they are associated with AWS DNS name to expose application.
From the AWS Docs.
use your DNS service, such as your domain registrar, to create a CNAME record to route queries to your load balancer. For more information, see the documentation for your DNS service.
CNAME records allow you to route traffic to other resources using the domain names. Refer to the docs for more information.
AWS Docs on linking Custom DNS with load balancers: https://docs.aws.amazon.com/elasticloadbalancing/latest/classic/using-domain-names-with-elb.html#dns-associate-custom-elb
Upvotes: 0
Reputation: 38
From the AWS documentation:
The IP addresses for Classic Load Balancers and Application Load Balancers change over time. Avoid using this information to statically configure your applications to point to these IP addresses.
You should use the provided DNS name of the LoadBalancer instead.
Upvotes: 2