1

I created a .net core Asp.Net web api project in Visual studio and published it in AWS (Launch type: FARGATE). I can see the Service under ECS => Clusters => default.

However, I cannot find the IP or host name to access the Asp.net web api service for testing?

ca9163d9
  • 27,283
  • 64
  • 210
  • 413
  • 1
    Did you assign your service a load balancer? If not you can check your network interfaces in EC2, but it's going to change each time a container launches. – Brandon Miller Jun 18 '18 at 19:00
  • 1
    No, I didn't assign my service a load balance. How to check the network interface in EC2 for ECS service? – ca9163d9 Jun 18 '18 at 19:14

1 Answers1

1

With Fargate, each task has an ENI attached to it, and that ENI uses an auto-assigned IP from the specified range of the subnet. So the short answer is, the IP can be found on the task instance page in the AWS Console. Click on the service name (default in your case), then the Tasks tab, and then click on the task GUID-- not the Task Definition-- and you'll see your IP listed in the Network area.

Note that this IP will change every time you stop and start a new task. The most straightforward way to combat this is by using an application load balancer (ALB).

bluescores
  • 4,437
  • 1
  • 20
  • 34