How can I get Public IP of my FARGATE ECS task with metadata endpoint or java sdk?
I want to get public IP of my fargate ECS task after container started. I get IPv4Addresses when requested http://169.254.170.2/v2/metadata/ but I don't get public IP of task. When I use runTask(request) method of RunTaskResult, again I don't get public IP from RunTaskResult. Is there a way to get public IP of my fargate task something like http://169.254.169.254/latest/meta-data/public-hostname (for EC2)? I solved my problem with DescribeNetworkInterfacesRequest.I get private IP of my container with curl http://169.254.170.2/v2/metadata/ then run this code. AmazonEC2 ec2AsyncClient=