1 Answer
- Newest
- Most votes
- Most comments
0
Hello.
By configuring Service Discovery, you can set a domain for the container.
https://docs.aws.amazon.com/AmazonECS/latest/developerguide/service-discovery.html
I hope the following documentation tutorials will be helpful.
https://docs.aws.amazon.com/AmazonECS/latest/userguide/create-service-discovery.html
Relevant content
- asked 3 months ago
- Accepted Answerasked 7 months ago
- AWS OFFICIALUpdated 5 days ago
- AWS OFFICIALUpdated 7 months ago
- AWS OFFICIALUpdated 2 years ago
- AWS OFFICIALUpdated 2 years ago
I tried to use this solution, but I faced with another issue. I'm using Account A for network and Account B for the ECS cluster. The private hosted zone can be created only into the Account A and I'm not able to associate the hostname with my container.
Do you have any recommendation how to archive this?
I have never set it up cross-account, but from reading the document below, I think it might not be possible to set it up unless the ECS task and VPC are in the same account. https://docs.aws.amazon.com/AmazonECS/latest/developerguide/service-connect.html
If there is another method, I think you will need to use ALB to route to tasks by DNS name. https://docs.aws.amazon.com/elasticloadbalancing/latest/application/listener-update-rules.html