Reputation: 377
I created a task definition that runs a Neo4j database, opened the ports 7474 and 7687 for the database http and bolt connectors, and launched the task definition in a ECS service of type Fargate in a private subnetwork.
How can I get the IP address of the container running the database without an ALB?
Thanks
Upvotes: 1
Views: 1070
Reputation: 1903
There are a couple of ways to obtain the ip address of your running container. Through the console the private subnet should be accessible as a link, and when you click on the subnet you should be able to see the private ip address.
You can also make use of the command line to describe your tasks. The describe output should contain the ip address of your running conatiner:
Finally, in Fargate there is also a metadata endpoint that is exposed in each running container, if need be, you can programmatically access that endpoint to obtain the ip address in your private subnet:
Upvotes: 1